mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-11 05:26:24 +02:00
GLES: Prevent race condition on shutdown.
emuThreadState might become STOPPED before the last frame has been run, which can cause WaitUntilQueueIdle to hang. It's simpler just to wait until StopThread() is called, since it now is. This will line up properly with run_.
This commit is contained in:
1 parent
fcc2b59c57
commit
cdf378d20c
4 files changed
+10
-10
No files matched your search
@@ -244,9 +244,9 @@ void MainThreadFunc() {
|
||||
|
||||
if (useEmuThread) {
|
||||
EmuThreadStop();
|
||||
while (emuThreadState != (int)EmuThreadState::STOPPED) {
|
||||
while (graphicsContext->ThreadFrame()) {
|
||||
// Need to keep eating frames to allow the EmuThread to exit correctly.
|
||||
graphicsContext->ThreadFrame();
|
||||
continue;
|
||||
}
|
||||
EmuThreadJoin();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user