summaryrefslogtreecommitdiff
path: root/Source/Core
diff options
context:
space:
mode:
authorLéo Lam <leo@innovatetechnologi.es>2018-05-26 20:18:31 +0200
committerGitHub <noreply@github.com>2018-05-26 20:18:31 +0200
commitf568e41fac4832b427b0ce290e65a485a790db40 (patch)
treef655a8fbc94b42a84f96e0c80542cfdcdaf3ee73 /Source/Core
parent71c6eb2a5d5cbd8aeff9bc8da02fe9a57dfa119c (diff)
parent792446e1da3c075882205ff0d7559bea12f50e85 (diff)
Merge pull request #6972 from JosJuice/default-jit
When CPU core is invalid, fall back to JIT instead of interpreter
Diffstat (limited to 'Source/Core')
-rw-r--r--Source/Core/Core/PowerPC/JitInterface.cpp4
-rw-r--r--Source/Core/Core/PowerPC/PowerPC.cpp13
2 files changed, 6 insertions, 11 deletions
diff --git a/Source/Core/Core/PowerPC/JitInterface.cpp b/Source/Core/Core/PowerPC/JitInterface.cpp
index 3a6aa29979..d2fac3eaab 100644
--- a/Source/Core/Core/PowerPC/JitInterface.cpp
+++ b/Source/Core/Core/PowerPC/JitInterface.cpp
@@ -64,7 +64,9 @@ CPUCoreBase* InitJitCore(int core)
break;
default:
- PanicAlert("Unrecognizable cpu_core: %d", core);
+ PanicAlertT("The selected CPU emulation core (%d) is not available. "
+ "Please select a different CPU emulation core in the settings.",
+ core);
g_jit = nullptr;
return nullptr;
}
diff --git a/Source/Core/Core/PowerPC/PowerPC.cpp b/Source/Core/Core/PowerPC/PowerPC.cpp
index 9ae77fe58b..5ec07db2b3 100644
--- a/Source/Core/Core/PowerPC/PowerPC.cpp
+++ b/Source/Core/Core/PowerPC/PowerPC.cpp
@@ -164,20 +164,13 @@ static void InitializeCPUCore(int cpu_core)
s_cpu_core_base = JitInterface::InitJitCore(cpu_core);
if (!s_cpu_core_base) // Handle Situations where JIT core isn't available
{
- WARN_LOG(POWERPC, "Jit core %d not available. Defaulting to interpreter.", cpu_core);
- s_cpu_core_base = s_interpreter;
+ WARN_LOG(POWERPC, "CPU core %d not available. Falling back to default.", cpu_core);
+ s_cpu_core_base = JitInterface::InitJitCore(DefaultCPUCore());
}
break;
}
- if (s_cpu_core_base != s_interpreter)
- {
- s_mode = CoreMode::JIT;
- }
- else
- {
- s_mode = CoreMode::Interpreter;
- }
+ s_mode = s_cpu_core_base == s_interpreter ? CoreMode::Interpreter : CoreMode::JIT;
}
const std::vector<CPUCore>& AvailableCPUCores()