From 7e56dcf665c2f401104cbec31a415ecf81277d88 Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Sat, 10 Aug 2013 03:36:22 -0700 Subject: [PATCH] Ignore changes to SeparateCPUThread after startup. --- Core/System.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Core/System.cpp b/Core/System.cpp index 4cb186897..6a005498d 100644 --- a/Core/System.cpp +++ b/Core/System.cpp @@ -75,7 +75,7 @@ volatile bool coreStatePending = false; static volatile CPUThreadState cpuThreadState = CPU_THREAD_NOT_RUNNING; bool IsOnSeparateCPUThread() { - if (g_Config.bSeparateCPUThread) { + if (cpuThread != NULL) { return cpuThread->get_id() == std::this_thread::get_id(); } else { return false; @@ -270,7 +270,7 @@ bool PSP_IsInited() { void PSP_Shutdown() { if (coreState == CORE_RUNNING) coreState = CORE_ERROR; - if (g_Config.bSeparateCPUThread) { + if (cpuThread != NULL) { CPU_SetState(CPU_THREAD_SHUTDOWN); CPU_WaitStatus(&CPU_IsShutdown); delete cpuThread; @@ -284,7 +284,7 @@ void PSP_Shutdown() { void PSP_RunLoopUntil(u64 globalticks) { SaveState::Process(); - if (g_Config.bSeparateCPUThread) { + if (cpuThread != NULL) { cpuThreadUntil = globalticks; if (CPU_NextState(CPU_THREAD_RUNNING, CPU_THREAD_EXECUTE)) { // The CPU doesn't actually respect cpuThreadUntil well, especially when skipping frames.