mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-13 14:30:27 +02:00
Keep EmuThread running on game shutdown.
Especially relevant for games that call sceKernelExitGame(), like most homebrew. Otherwise, EmuThread actually quits and we can't continue.
This commit is contained in:
1 parent
97943bfbc3
commit
926e1ebddc
2 files changed
+10
-1
No files matched your search
@@ -67,6 +67,7 @@ void EmuThread_Start()
|
||||
|
||||
void EmuThread_Stop()
|
||||
{
|
||||
globalUIState = UISTATE_EXIT;
|
||||
// DSound_UpdateSound();
|
||||
Core_Stop();
|
||||
Core_WaitInactive(800);
|
||||
@@ -137,7 +138,14 @@ unsigned int WINAPI TheThread(void *)
|
||||
|
||||
Core_EnableStepping(FALSE);
|
||||
|
||||
Core_Run();
|
||||
while (globalUIState != UISTATE_EXIT)
|
||||
{
|
||||
Core_Run();
|
||||
|
||||
// We're here again, so the game quit. Restart Core_Run() which controls the UI.
|
||||
// This way they can load a new game.
|
||||
Core_UpdateState(CORE_RUNNING);
|
||||
}
|
||||
|
||||
shutdown:
|
||||
_InterlockedExchange(&emuThreadReady, THREAD_SHUTDOWN);
|
||||
|
||||
Reference in new issue
Block a user