mirror of
https://github.com/RetroDECK/Duckstation.git
synced 2024-11-27 08:05:41 +00:00
GameSettings: Add force 4:3 for 24-bit
This commit is contained in:
parent
d73271ec0a
commit
f26e75fa37
|
@ -305,6 +305,7 @@ void GamePropertiesDialog::populateGameSettings()
|
||||||
populateBooleanUserSetting(m_ui.userScaledDithering, gs.gpu_scaled_dithering);
|
populateBooleanUserSetting(m_ui.userScaledDithering, gs.gpu_scaled_dithering);
|
||||||
populateBooleanUserSetting(m_ui.userForceNTSCTimings, gs.gpu_force_ntsc_timings);
|
populateBooleanUserSetting(m_ui.userForceNTSCTimings, gs.gpu_force_ntsc_timings);
|
||||||
populateBooleanUserSetting(m_ui.userWidescreenHack, gs.gpu_widescreen_hack);
|
populateBooleanUserSetting(m_ui.userWidescreenHack, gs.gpu_widescreen_hack);
|
||||||
|
populateBooleanUserSetting(m_ui.userForce43For24Bit, gs.display_force_4_3_for_24bit);
|
||||||
populateBooleanUserSetting(m_ui.userPGXP, gs.gpu_pgxp);
|
populateBooleanUserSetting(m_ui.userPGXP, gs.gpu_pgxp);
|
||||||
|
|
||||||
if (gs.controller_1_type.has_value())
|
if (gs.controller_1_type.has_value())
|
||||||
|
@ -423,6 +424,7 @@ void GamePropertiesDialog::connectUi()
|
||||||
connectBooleanUserSetting(m_ui.userScaledDithering, &m_game_settings.gpu_scaled_dithering);
|
connectBooleanUserSetting(m_ui.userScaledDithering, &m_game_settings.gpu_scaled_dithering);
|
||||||
connectBooleanUserSetting(m_ui.userForceNTSCTimings, &m_game_settings.gpu_force_ntsc_timings);
|
connectBooleanUserSetting(m_ui.userForceNTSCTimings, &m_game_settings.gpu_force_ntsc_timings);
|
||||||
connectBooleanUserSetting(m_ui.userWidescreenHack, &m_game_settings.gpu_widescreen_hack);
|
connectBooleanUserSetting(m_ui.userWidescreenHack, &m_game_settings.gpu_widescreen_hack);
|
||||||
|
connectBooleanUserSetting(m_ui.userForce43For24Bit, &m_game_settings.display_force_4_3_for_24bit);
|
||||||
connectBooleanUserSetting(m_ui.userPGXP, &m_game_settings.gpu_pgxp);
|
connectBooleanUserSetting(m_ui.userPGXP, &m_game_settings.gpu_pgxp);
|
||||||
|
|
||||||
connect(m_ui.userControllerType1, QOverload<int>::of(&QComboBox::currentIndexChanged), [this](int index) {
|
connect(m_ui.userControllerType1, QOverload<int>::of(&QComboBox::currentIndexChanged), [this](int index) {
|
||||||
|
|
|
@ -309,6 +309,16 @@
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="2" column="0">
|
<item row="2" column="0">
|
||||||
|
<widget class="QCheckBox" name="userForce43For24Bit">
|
||||||
|
<property name="text">
|
||||||
|
<string>Force 4:3 For 24-Bit Display (disable widescreen for FMVs)</string>
|
||||||
|
</property>
|
||||||
|
<property name="tristate">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="1">
|
||||||
<widget class="QCheckBox" name="userPGXP">
|
<widget class="QCheckBox" name="userPGXP">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>PGXP Geometry Correction</string>
|
<string>PGXP Geometry Correction</string>
|
||||||
|
|
|
@ -114,7 +114,7 @@ private:
|
||||||
enum : u32
|
enum : u32
|
||||||
{
|
{
|
||||||
GAME_LIST_CACHE_SIGNATURE = 0x45434C47,
|
GAME_LIST_CACHE_SIGNATURE = 0x45434C47,
|
||||||
GAME_LIST_CACHE_VERSION = 9
|
GAME_LIST_CACHE_VERSION = 10
|
||||||
};
|
};
|
||||||
|
|
||||||
using DatabaseMap = std::unordered_map<std::string, GameListDatabaseEntry>;
|
using DatabaseMap = std::unordered_map<std::string, GameListDatabaseEntry>;
|
||||||
|
|
|
@ -109,6 +109,7 @@ bool Entry::LoadFromStream(ByteStream* stream)
|
||||||
!ReadOptionalFromStream(stream, &display_crop_mode) || !ReadOptionalFromStream(stream, &display_aspect_ratio) ||
|
!ReadOptionalFromStream(stream, &display_crop_mode) || !ReadOptionalFromStream(stream, &display_aspect_ratio) ||
|
||||||
!ReadOptionalFromStream(stream, &display_linear_upscaling) ||
|
!ReadOptionalFromStream(stream, &display_linear_upscaling) ||
|
||||||
!ReadOptionalFromStream(stream, &display_integer_upscaling) ||
|
!ReadOptionalFromStream(stream, &display_integer_upscaling) ||
|
||||||
|
!ReadOptionalFromStream(stream, &display_force_4_3_for_24bit) ||
|
||||||
!ReadOptionalFromStream(stream, &gpu_resolution_scale) || !ReadOptionalFromStream(stream, &gpu_true_color) ||
|
!ReadOptionalFromStream(stream, &gpu_resolution_scale) || !ReadOptionalFromStream(stream, &gpu_true_color) ||
|
||||||
!ReadOptionalFromStream(stream, &gpu_scaled_dithering) ||
|
!ReadOptionalFromStream(stream, &gpu_scaled_dithering) ||
|
||||||
!ReadOptionalFromStream(stream, &gpu_force_ntsc_timings) ||
|
!ReadOptionalFromStream(stream, &gpu_force_ntsc_timings) ||
|
||||||
|
@ -148,6 +149,7 @@ bool Entry::SaveToStream(ByteStream* stream) const
|
||||||
WriteOptionalToStream(stream, display_aspect_ratio) &&
|
WriteOptionalToStream(stream, display_aspect_ratio) &&
|
||||||
WriteOptionalToStream(stream, display_linear_upscaling) &&
|
WriteOptionalToStream(stream, display_linear_upscaling) &&
|
||||||
WriteOptionalToStream(stream, display_integer_upscaling) &&
|
WriteOptionalToStream(stream, display_integer_upscaling) &&
|
||||||
|
WriteOptionalToStream(stream, display_force_4_3_for_24bit) &&
|
||||||
WriteOptionalToStream(stream, gpu_resolution_scale) && WriteOptionalToStream(stream, gpu_true_color) &&
|
WriteOptionalToStream(stream, gpu_resolution_scale) && WriteOptionalToStream(stream, gpu_true_color) &&
|
||||||
WriteOptionalToStream(stream, gpu_scaled_dithering) && WriteOptionalToStream(stream, gpu_force_ntsc_timings) &&
|
WriteOptionalToStream(stream, gpu_scaled_dithering) && WriteOptionalToStream(stream, gpu_force_ntsc_timings) &&
|
||||||
WriteOptionalToStream(stream, gpu_texture_filter) && WriteOptionalToStream(stream, gpu_widescreen_hack) &&
|
WriteOptionalToStream(stream, gpu_texture_filter) && WriteOptionalToStream(stream, gpu_widescreen_hack) &&
|
||||||
|
@ -184,6 +186,9 @@ static void ParseIniSection(Entry* entry, const char* section, const CSimpleIniA
|
||||||
cvalue = ini.GetValue(section, "DisplayIntegerUpscaling", nullptr);
|
cvalue = ini.GetValue(section, "DisplayIntegerUpscaling", nullptr);
|
||||||
if (cvalue)
|
if (cvalue)
|
||||||
entry->display_integer_upscaling = StringUtil::FromChars<bool>(cvalue);
|
entry->display_integer_upscaling = StringUtil::FromChars<bool>(cvalue);
|
||||||
|
cvalue = ini.GetValue(section, "DisplayForce4_3For24Bit", nullptr);
|
||||||
|
if (cvalue)
|
||||||
|
entry->display_force_4_3_for_24bit = StringUtil::FromChars<bool>(cvalue);
|
||||||
|
|
||||||
cvalue = ini.GetValue(section, "GPUResolutionScale", nullptr);
|
cvalue = ini.GetValue(section, "GPUResolutionScale", nullptr);
|
||||||
if (cvalue)
|
if (cvalue)
|
||||||
|
@ -253,6 +258,8 @@ static void StoreIniSection(const Entry& entry, const char* section, CSimpleIniA
|
||||||
ini.SetValue(section, "DisplayLinearUpscaling", entry.display_linear_upscaling.value() ? "true" : "false");
|
ini.SetValue(section, "DisplayLinearUpscaling", entry.display_linear_upscaling.value() ? "true" : "false");
|
||||||
if (entry.display_integer_upscaling.has_value())
|
if (entry.display_integer_upscaling.has_value())
|
||||||
ini.SetValue(section, "DisplayIntegerUpscaling", entry.display_integer_upscaling.value() ? "true" : "false");
|
ini.SetValue(section, "DisplayIntegerUpscaling", entry.display_integer_upscaling.value() ? "true" : "false");
|
||||||
|
if (entry.display_force_4_3_for_24bit.has_value())
|
||||||
|
ini.SetValue(section, "DisplayForce4_3For24Bit", entry.display_force_4_3_for_24bit.value() ? "true" : "false");
|
||||||
|
|
||||||
if (entry.gpu_resolution_scale.has_value())
|
if (entry.gpu_resolution_scale.has_value())
|
||||||
ini.SetLongValue(section, "GPUResolutionScale", static_cast<s32>(entry.gpu_resolution_scale.value()));
|
ini.SetLongValue(section, "GPUResolutionScale", static_cast<s32>(entry.gpu_resolution_scale.value()));
|
||||||
|
@ -400,6 +407,8 @@ void Entry::ApplySettings(bool display_osd_messages) const
|
||||||
g_settings.display_linear_filtering = display_linear_upscaling.value();
|
g_settings.display_linear_filtering = display_linear_upscaling.value();
|
||||||
if (display_integer_upscaling.has_value())
|
if (display_integer_upscaling.has_value())
|
||||||
g_settings.display_integer_scaling = display_integer_upscaling.value();
|
g_settings.display_integer_scaling = display_integer_upscaling.value();
|
||||||
|
if (display_force_4_3_for_24bit.has_value())
|
||||||
|
g_settings.display_force_4_3_for_24bit = display_force_4_3_for_24bit.value();
|
||||||
|
|
||||||
if (gpu_resolution_scale.has_value())
|
if (gpu_resolution_scale.has_value())
|
||||||
g_settings.gpu_resolution_scale = gpu_resolution_scale.value();
|
g_settings.gpu_resolution_scale = gpu_resolution_scale.value();
|
||||||
|
|
|
@ -44,6 +44,7 @@ struct Entry
|
||||||
std::optional<DisplayAspectRatio> display_aspect_ratio;
|
std::optional<DisplayAspectRatio> display_aspect_ratio;
|
||||||
std::optional<bool> display_linear_upscaling;
|
std::optional<bool> display_linear_upscaling;
|
||||||
std::optional<bool> display_integer_upscaling;
|
std::optional<bool> display_integer_upscaling;
|
||||||
|
std::optional<bool> display_force_4_3_for_24bit;
|
||||||
std::optional<u32> gpu_resolution_scale;
|
std::optional<u32> gpu_resolution_scale;
|
||||||
std::optional<bool> gpu_true_color;
|
std::optional<bool> gpu_true_color;
|
||||||
std::optional<bool> gpu_scaled_dithering;
|
std::optional<bool> gpu_scaled_dithering;
|
||||||
|
|
Loading…
Reference in a new issue