When CPU core is invalid, fall back to JIT instead of interpreter
This might happen if someone moves settings between e.g. a PC and an Android device, or if someone was using JITIL and updates Dolphin. I also made the panic alert a bit more explanatory.
This commit is contained in:
parent
92ec97f899
commit
792446e1da
|
@ -64,7 +64,9 @@ CPUCoreBase* InitJitCore(int core)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
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;
|
g_jit = nullptr;
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
|
@ -164,20 +164,13 @@ static void InitializeCPUCore(int cpu_core)
|
||||||
s_cpu_core_base = JitInterface::InitJitCore(cpu_core);
|
s_cpu_core_base = JitInterface::InitJitCore(cpu_core);
|
||||||
if (!s_cpu_core_base) // Handle Situations where JIT core isn't available
|
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);
|
WARN_LOG(POWERPC, "CPU core %d not available. Falling back to default.", cpu_core);
|
||||||
s_cpu_core_base = s_interpreter;
|
s_cpu_core_base = JitInterface::InitJitCore(DefaultCPUCore());
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (s_cpu_core_base != s_interpreter)
|
s_mode = s_cpu_core_base == s_interpreter ? CoreMode::Interpreter : CoreMode::JIT;
|
||||||
{
|
|
||||||
s_mode = CoreMode::JIT;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
s_mode = CoreMode::Interpreter;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const std::vector<CPUCore>& AvailableCPUCores()
|
const std::vector<CPUCore>& AvailableCPUCores()
|
||||||
|
|
Loading…
Reference in New Issue