From 655797a8467d07c2e1ec8a6108ca66a12d76e531 Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Mon, 6 Feb 2023 21:07:32 -0800 Subject: [PATCH] iOS: Disable jit in DefaultCpuCore(). This means loading game-specific inis should properly auto-disable. --- Core/Config.cpp | 8 +++++--- Core/Config.h | 2 -- UI/NativeApp.cpp | 7 ------- 3 files changed, 5 insertions(+), 12 deletions(-) diff --git a/Core/Config.cpp b/Core/Config.cpp index 86cd15c61e..836e7244ec 100644 --- a/Core/Config.cpp +++ b/Core/Config.cpp @@ -60,7 +60,7 @@ http::Downloader g_DownloadManager; Config g_Config; -bool jitForcedOff; +static bool jitForcedOff; // Not in Config.h because it's #included a lot. struct ConfigPrivate { @@ -477,9 +477,11 @@ std::string CreateRandMAC() { static int DefaultCpuCore() { #if PPSSPP_ARCH(ARM) || PPSSPP_ARCH(ARM64) || PPSSPP_ARCH(X86) || PPSSPP_ARCH(AMD64) - return (int)CPUCore::JIT; + if (System_GetPropertyBool(SYSPROP_CAN_JIT)) + return (int)CPUCore::JIT; + return (int)CPUCore::IR_JIT; #else - return (int)CPUCore::INTERPRETER; + return (int)CPUCore::IR_JIT; #endif } diff --git a/Core/Config.h b/Core/Config.h index dc2f1a8ca7..1d53f24724 100644 --- a/Core/Config.h +++ b/Core/Config.h @@ -29,8 +29,6 @@ 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 b66e64b93e..2de45b8861 100644 --- a/UI/NativeApp.cpp +++ b/UI/NativeApp.cpp @@ -758,13 +758,6 @@ void NativeInit(int argc, const char *argv[], const char *savegame_dir, const ch } } - if (System_GetPropertyBool(SYSPROP_CAN_JIT) == false && g_Config.iCpuCore == (int)CPUCore::JIT) { - // 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... - jitForcedOff = true; - } - auto des = GetI18NCategory("DesktopUI"); // Note to translators: do not translate this/add this to PPSSPP-lang's files. // It's intended to be custom for every user.