Fix a potential issue when someone has a CPU core that isn't available on that host set in the INI file, it would just fail out. Now it defaults to interpreter.
This commit is contained in:
parent
be217bf096
commit
f6d45ea461
|
@ -81,6 +81,7 @@ namespace JitInterface
|
|||
default:
|
||||
{
|
||||
PanicAlert("Unrecognizable cpu_core: %d", core);
|
||||
jit = NULL;
|
||||
return NULL;
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -51,6 +51,3 @@ namespace JitInterface
|
|||
extern bool bFakeVMEM;
|
||||
extern bool bMMU;
|
||||
|
||||
#ifdef _M_ARM
|
||||
#include "JitArm32/Jit.h"
|
||||
#endif
|
||||
|
|
|
@ -168,6 +168,11 @@ void Init(int cpu_core)
|
|||
}
|
||||
default:
|
||||
cpu_core_base = JitInterface::InitJitCore(cpu_core);
|
||||
if (!cpu_core_base) // Handle Situations where JIT core isn't available
|
||||
{
|
||||
WARN_LOG(POWERPC, "Jit core %d not available. Defaulting to interpreter.", cpu_core);
|
||||
cpu_core_base = interpreter;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -213,6 +218,8 @@ void SetMode(CoreMode new_mode)
|
|||
case MODE_JIT: // Switching from interpreter to JIT.
|
||||
// Don't really need to do much. It'll work, the cache will refill itself.
|
||||
cpu_core_base = JitInterface::GetCore();
|
||||
if (!cpu_core_base) // Has a chance to not get a working JIT core if one isn't active on host
|
||||
cpu_core_base = interpreter;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue