From b2057ac6cc0035a05874c79553f5499af22afc04 Mon Sep 17 00:00:00 2001 From: Connor McLaughlin Date: Wed, 2 Sep 2020 00:03:53 +1000 Subject: [PATCH] GameSettings: Add disallow force NTSC timings trait --- src/frontend-common/game_settings.cpp | 13 +++++++++++++ src/frontend-common/game_settings.h | 1 + 2 files changed, 14 insertions(+) diff --git a/src/frontend-common/game_settings.cpp b/src/frontend-common/game_settings.cpp index 9b9cf2228..4e655de20 100644 --- a/src/frontend-common/game_settings.cpp +++ b/src/frontend-common/game_settings.cpp @@ -25,6 +25,7 @@ std::array, static_cast(Trait::Count)> {"DisableTrueColor", TRANSLATABLE("GameSettingsTrait", "Disable True Color")}, {"DisableUpscaling", TRANSLATABLE("GameSettingsTrait", "Disable Upscaling")}, {"DisableScaledDithering", TRANSLATABLE("GameSettingsTrait", "Disable Scaled Dithering")}, + {"DisableForceNTSCTimings", TRANSLATABLE("GameSettingsTrait", "Disallow Forcing NTSC Timings")}, {"DisableWidescreen", TRANSLATABLE("GameSettingsTrait", "Disable Widescreen")}, {"DisablePGXP", TRANSLATABLE("GameSettingsTrait", "Disable PGXP")}, {"DisablePGXPCulling", TRANSLATABLE("GameSettingsTrait", "Disable PGXP Culling")}, @@ -517,6 +518,18 @@ void Entry::ApplySettings(bool display_osd_messages) const g_settings.gpu_widescreen_hack = false; } + if (HasTrait(Trait::DisableForceNTSCTimings)) + { + if (display_osd_messages && g_settings.gpu_force_ntsc_timings) + { + g_host_interface->AddOSDMessage( + g_host_interface->TranslateStdString("OSDMessage", "Forcing NTSC Timings disallowed by game settings."), + osd_duration); + } + + g_settings.gpu_force_ntsc_timings = false; + } + if (HasTrait(Trait::DisablePGXP)) { if (display_osd_messages && g_settings.gpu_pgxp_enable) diff --git a/src/frontend-common/game_settings.h b/src/frontend-common/game_settings.h index 176bea0b3..3f67eb08c 100644 --- a/src/frontend-common/game_settings.h +++ b/src/frontend-common/game_settings.h @@ -16,6 +16,7 @@ enum class Trait : u32 DisableTrueColor, DisableUpscaling, DisableScaledDithering, + DisableForceNTSCTimings, DisableWidescreen, DisablePGXP, DisablePGXPCulling,