From 525cce095a6e4ac569736c14dbcde7b64a92328f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Sun, 17 Dec 2017 13:14:06 +0100 Subject: [PATCH] Implement warning when trying to play Ghost of Sparta with a modified CPU clock, as suggested by unknownbrackets in #7411 --- Core/Compatibility.cpp | 1 + Core/Compatibility.h | 3 ++- UI/EmuScreen.cpp | 5 +++++ assets/compat.ini | 10 ++++++++++ 4 files changed, 18 insertions(+), 1 deletion(-) diff --git a/Core/Compatibility.cpp b/Core/Compatibility.cpp index d88431ff23..b12daff7b3 100644 --- a/Core/Compatibility.cpp +++ b/Core/Compatibility.cpp @@ -54,6 +54,7 @@ void Compatibility::CheckSettings(IniFile &iniFile, const std::string &gameID) { CheckSetting(iniFile, gameID, "FakeMipmapChange", &flags_.FakeMipmapChange); CheckSetting(iniFile, gameID, "RequireBufferedRendering", &flags_.RequireBufferedRendering); CheckSetting(iniFile, gameID, "RequireBlockTransfer", &flags_.RequireBlockTransfer); + CheckSetting(iniFile, gameID, "RequireDefaultCPUClock", &flags_.RequireDefaultCPUClock); CheckSetting(iniFile, gameID, "DisableReadbacks", &flags_.DisableReadbacks); CheckSetting(iniFile, gameID, "DisableAccurateDepth", &flags_.DisableAccurateDepth); } diff --git a/Core/Compatibility.h b/Core/Compatibility.h index 589553f026..78cc86db12 100644 --- a/Core/Compatibility.h +++ b/Core/Compatibility.h @@ -18,7 +18,7 @@ #pragma once #include -#include +#include // Compatibility flags are controlled by assets/compat.ini. // Alternatively, if PSP/SYSTEM/compat.ini exists, it is merged on top, to enable editing @@ -54,6 +54,7 @@ struct CompatFlags { bool FakeMipmapChange; bool RequireBufferedRendering; bool RequireBlockTransfer; + bool RequireDefaultCPUClock; bool DisableReadbacks; bool DisableAccurateDepth; }; diff --git a/UI/EmuScreen.cpp b/UI/EmuScreen.cpp index 6326e6f094..c5d60485ab 100644 --- a/UI/EmuScreen.cpp +++ b/UI/EmuScreen.cpp @@ -226,6 +226,11 @@ void EmuScreen::bootGame(const std::string &filename) { host->NotifyUserMessage(gr->T("BlockTransferRequired", "Warning: This game requires Simulate Block Transfer Mode to be set to On."), 15.0f); } + if (PSP_CoreParameter().compat.flags().RequireDefaultCPUClock && g_Config.iLockedCPUSpeed != 0) { + I18NCategory *gr = GetI18NCategory("Graphics"); + host->NotifyUserMessage(gr->T("DefaultCPUClockRequired", "Warning: This game requires the CPU clock to be set to default."), 15.0f); + } + loadingViewColor_->Divert(0xFFFFFFFF, 0.15f); loadingViewVisible_->Divert(UI::V_VISIBLE, 0.15f); } diff --git a/assets/compat.ini b/assets/compat.ini index 54279cb8e2..e977c75b48 100644 --- a/assets/compat.ini +++ b/assets/compat.ini @@ -316,3 +316,13 @@ ULJM05242 = true ULJM05371 = true NPJH50304 = true ULES00703 = true + +[RequireDefaultCPUClock] +# GOW : Ghost of Sparta +UCUS98737 = true +UCAS40323 = true +NPHG00092 = true +NPEG00044 = true +NPJG00120 = true +UCJS10114 = true +UCES01401 = true \ No newline at end of file