Make sure the gpu thread has a chance to run.

If the scheduler puts it on the same core, it may not even do anything
before we check if the framebuffer is dirty, so SyncThread will quit since
it's not even running.

Instead, let's wait until it's at least done something.
This commit is contained in:
Unknown W. Brackets
2013-11-09 23:08:28 -08:00
parent 879060f008
commit afafa5fcd6
3 changed files with 14 additions and 3 deletions
+3
View File
@@ -336,6 +336,9 @@ void PSP_RunLoopUntil(u64 globalticks) {
}
if (cpuThread != NULL) {
// Tell the gpu a new frame is about to begin, before we start the CPU.
gpu->SyncBeginFrame();
cpuThreadUntil = globalticks;
if (CPU_NextState(CPU_THREAD_RUNNING, CPU_THREAD_EXECUTE)) {
// The CPU doesn't actually respect cpuThreadUntil well, especially when skipping frames.