From a709e8eaa802bb8ff0c891c4f47d5112a087da92 Mon Sep 17 00:00:00 2001 From: Halo-Michael Date: Mon, 30 May 2022 06:32:18 +0800 Subject: [PATCH] Fix CpuCore select --- Core/Config.cpp | 4 ++++ Core/Config.h | 2 ++ UI/NativeApp.cpp | 2 +- 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/Core/Config.cpp b/Core/Config.cpp index 81c0be55b8..42a56958e7 100644 --- a/Core/Config.cpp +++ b/Core/Config.cpp @@ -1527,7 +1527,11 @@ bool Config::Save(const char *saveReason) { } if (jitForcedOff) { // force JIT off again just in case Config::Save() is called without exiting PPSSPP +#if PPSSPP_PLATFORM(IOS) + g_Config.iCpuCore = (int)CPUCore::IR_JIT; +#else g_Config.iCpuCore = (int)CPUCore::INTERPRETER; +#endif } return true; } diff --git a/Core/Config.h b/Core/Config.h index 92d240c0af..1337a82d33 100644 --- a/Core/Config.h +++ b/Core/Config.h @@ -29,6 +29,8 @@ extern const char *PPSSPP_GIT_VERSION; +extern bool jitForcedOff; + enum ChatPositions { BOTTOM_LEFT = 0, BOTTOM_CENTER = 1, diff --git a/UI/NativeApp.cpp b/UI/NativeApp.cpp index b65c7ecea8..afd84d0f97 100644 --- a/UI/NativeApp.cpp +++ b/UI/NativeApp.cpp @@ -770,7 +770,7 @@ void NativeInit(int argc, const char *argv[], const char *savegame_dir, const ch // Just gonna force it to the IR interpreter on startup. // We don't hide the option, but we make sure it's off on bootup. In case someone wants // to experiment in future iOS versions or something... - g_Config.iCpuCore = (int)CPUCore::IR_JIT; + jitForcedOff = true; } auto des = GetI18NCategory("DesktopUI");