diff --git a/src/duckstation-qt/gamepropertiesdialog.cpp b/src/duckstation-qt/gamepropertiesdialog.cpp index 05cb164c0..a8c01e375 100644 --- a/src/duckstation-qt/gamepropertiesdialog.cpp +++ b/src/duckstation-qt/gamepropertiesdialog.cpp @@ -305,6 +305,7 @@ void GamePropertiesDialog::populateGameSettings() populateBooleanUserSetting(m_ui.userScaledDithering, gs.gpu_scaled_dithering); populateBooleanUserSetting(m_ui.userForceNTSCTimings, gs.gpu_force_ntsc_timings); 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); 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.userForceNTSCTimings, &m_game_settings.gpu_force_ntsc_timings); 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); connect(m_ui.userControllerType1, QOverload::of(&QComboBox::currentIndexChanged), [this](int index) { diff --git a/src/duckstation-qt/gamepropertiesdialog.ui b/src/duckstation-qt/gamepropertiesdialog.ui index 24fe87525..8aea03863 100644 --- a/src/duckstation-qt/gamepropertiesdialog.ui +++ b/src/duckstation-qt/gamepropertiesdialog.ui @@ -309,6 +309,16 @@ + + + Force 4:3 For 24-Bit Display (disable widescreen for FMVs) + + + true + + + + PGXP Geometry Correction diff --git a/src/frontend-common/game_list.h b/src/frontend-common/game_list.h index 999ffd77e..ac80389c5 100644 --- a/src/frontend-common/game_list.h +++ b/src/frontend-common/game_list.h @@ -114,7 +114,7 @@ private: enum : u32 { GAME_LIST_CACHE_SIGNATURE = 0x45434C47, - GAME_LIST_CACHE_VERSION = 9 + GAME_LIST_CACHE_VERSION = 10 }; using DatabaseMap = std::unordered_map; diff --git a/src/frontend-common/game_settings.cpp b/src/frontend-common/game_settings.cpp index 5652e7a7d..7098b4903 100644 --- a/src/frontend-common/game_settings.cpp +++ b/src/frontend-common/game_settings.cpp @@ -109,6 +109,7 @@ bool Entry::LoadFromStream(ByteStream* stream) !ReadOptionalFromStream(stream, &display_crop_mode) || !ReadOptionalFromStream(stream, &display_aspect_ratio) || !ReadOptionalFromStream(stream, &display_linear_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_scaled_dithering) || !ReadOptionalFromStream(stream, &gpu_force_ntsc_timings) || @@ -148,6 +149,7 @@ bool Entry::SaveToStream(ByteStream* stream) const WriteOptionalToStream(stream, display_aspect_ratio) && WriteOptionalToStream(stream, display_linear_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_scaled_dithering) && WriteOptionalToStream(stream, gpu_force_ntsc_timings) && 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); if (cvalue) entry->display_integer_upscaling = StringUtil::FromChars(cvalue); + cvalue = ini.GetValue(section, "DisplayForce4_3For24Bit", nullptr); + if (cvalue) + entry->display_force_4_3_for_24bit = StringUtil::FromChars(cvalue); cvalue = ini.GetValue(section, "GPUResolutionScale", nullptr); 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"); if (entry.display_integer_upscaling.has_value()) 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()) ini.SetLongValue(section, "GPUResolutionScale", static_cast(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(); if (display_integer_upscaling.has_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()) g_settings.gpu_resolution_scale = gpu_resolution_scale.value(); diff --git a/src/frontend-common/game_settings.h b/src/frontend-common/game_settings.h index fb02776f7..9f99d8c60 100644 --- a/src/frontend-common/game_settings.h +++ b/src/frontend-common/game_settings.h @@ -44,6 +44,7 @@ struct Entry std::optional display_aspect_ratio; std::optional display_linear_upscaling; std::optional display_integer_upscaling; + std::optional display_force_4_3_for_24bit; std::optional gpu_resolution_scale; std::optional gpu_true_color; std::optional gpu_scaled_dithering;