mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-02-20 06:00:58 +00:00
Merge pull request #2340 from unknownbrackets/windows-ui
Keep EmuThread running on game shutdown
This commit is contained in:
commit
b96250eadb
@ -32,6 +32,7 @@ enum GlobalUIState {
|
||||
UISTATE_MENU,
|
||||
UISTATE_PAUSEMENU,
|
||||
UISTATE_INGAME,
|
||||
UISTATE_EXIT,
|
||||
};
|
||||
|
||||
|
||||
|
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user