mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Bail when CPU thread disabled to ensure good perf.
This commit is contained in:
parent
3819886e2e
commit
a56cac1eb3
2 changed files with 5 additions and 1 deletions
|
@ -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;
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Add table
Reference in a new issue