Bail when CPU thread disabled to ensure good perf.

This commit is contained in:
Unknown W. Brackets 2013-08-08 00:18:00 -07:00
parent 3819886e2e
commit a56cac1eb3
2 changed files with 5 additions and 1 deletions

View file

@ -56,6 +56,7 @@ public:
bool bIgnoreBadMemAccess;
bool bFastMemory;
bool bJit;
// Definitely cannot be changed while game is running.
bool bUseCPUThread;
int iLockedCPUSpeed;
bool bAutoSaveSymbolMap;

View file

@ -577,13 +577,16 @@ void GPUCommon::RunEventsUntil(u64 globalticks) {
}
// coreState changes won't wake us, so recheck periodically.
if (!g_Config.bUseCPUThread) {
return;
}
eventsCond.wait_for(eventsLock, 1);
} while (CoreTiming::GetTicks() < globalticks);
}
void GPUCommon::SyncThread() {
if (!g_Config.bUseCPUThread) {
_dbg_assert_msg_(G3D, !HasEvents(), "Should never have pending events when CPU/GPU on same thread.");
return;
}
while (HasEvents() && coreState == CORE_RUNNING) {