mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-29 01:03:41 +01:00
Cleaner exit from emuthread, as used by OpenGL. Don't know how it worked before...
This commit is contained in:
1 parent
a0c893cc8f
commit
436a3e0d61
5 files changed
+17
-10
No files matched your search
@@ -82,7 +82,9 @@ static void EmuThreadFunc(GraphicsContext *graphicsContext) {
|
||||
// This way they can load a new game.
|
||||
if (!Core_IsActive())
|
||||
UpdateUIState(UISTATE_MENU);
|
||||
Core_Run(g_graphicsContext);
|
||||
if (!Core_Run(g_graphicsContext)) {
|
||||
emuThreadState = (int)EmuThreadState::QUIT_REQUESTED;
|
||||
}
|
||||
}
|
||||
|
||||
emuThreadState = (int)EmuThreadState::STOPPED;
|
||||
@@ -99,12 +101,14 @@ static void EmuThreadStart(GraphicsContext *graphicsContext) {
|
||||
}
|
||||
|
||||
static void EmuThreadStop() {
|
||||
emuThreadState = (int)EmuThreadState::QUIT_REQUESTED;
|
||||
if (emuThreadState != (int)EmuThreadState::QUIT_REQUESTED &&
|
||||
emuThreadState != (int)EmuThreadState::STOPPED) {
|
||||
emuThreadState = (int)EmuThreadState::QUIT_REQUESTED;
|
||||
}
|
||||
}
|
||||
|
||||
static void EmuThreadJoin() {
|
||||
emuThread.join();
|
||||
emuThread = std::thread();
|
||||
INFO_LOG(SYSTEM, "EmuThreadJoin - joined");
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user