From e7cfb5234fa06d692947babbfbee63cac4575d6d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Fri, 3 May 2024 16:49:28 +0200 Subject: [PATCH] Improve checks for JIT ability Prep for iOS --- Core/Config.cpp | 7 +++++++ UI/GameSettingsScreen.cpp | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/Core/Config.cpp b/Core/Config.cpp index 395e2651ee..3730d51599 100644 --- a/Core/Config.cpp +++ b/Core/Config.cpp @@ -1227,6 +1227,13 @@ void Config::Load(const char *iniFileName, const char *controllerIniFilename) { ResetControlLayout(); } + // Force JIT setting to a valid value for the current system configuration. + if (!System_GetPropertyBool(SYSPROP_CAN_JIT)) { + if (g_Config.iCpuCore == (int)CPUCore::JIT || g_Config.iCpuCore == (int)CPUCore::JIT_IR) { + g_Config.iCpuCore = (int)CPUCore::IR_INTERPRETER; + } + } + const char *gitVer = PPSSPP_GIT_VERSION; Version installed(gitVer); Version upgrade(upgradeVersion); diff --git a/UI/GameSettingsScreen.cpp b/UI/GameSettingsScreen.cpp index a854b14298..7c8af35a3f 100644 --- a/UI/GameSettingsScreen.cpp +++ b/UI/GameSettingsScreen.cpp @@ -1755,7 +1755,7 @@ void DeveloperToolsScreen::CreateViews() { list->Add(new ItemHeader(sy->T("General"))); - bool canUseJit = true; + bool canUseJit = System_GetPropertyBool(SYSPROP_CAN_JIT); // iOS can now use JIT on all modes, apparently. // The bool may come in handy for future non-jit platforms though (UWP XB1?)