GameSettings: Add disallow force NTSC timings trait

This commit is contained in:
Connor McLaughlin 2020-09-02 00:03:53 +10:00
parent c9cefe4020
commit b2057ac6cc
2 changed files with 14 additions and 0 deletions

View File

@ -25,6 +25,7 @@ std::array<std::pair<const char*, const char*>, static_cast<u32>(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)

View File

@ -16,6 +16,7 @@ enum class Trait : u32
DisableTrueColor,
DisableUpscaling,
DisableScaledDithering,
DisableForceNTSCTimings,
DisableWidescreen,
DisablePGXP,
DisablePGXPCulling,