1. TAS Groundwork: Saving the state (compression and memory dump to file) is now done on a separate thread (thread-safe). Now state saving is silent and quick.

2. When stopping, GUI doesn't let the user choose another game and effectively crash Dolphin
3. Omitted an unneeded loop in AudioCommon

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3552 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
XTra.KrazzY
2009-06-26 22:36:44 +00:00
parent 8a6fcdc2bc
commit 46b0fd3c96
6 changed files with 72 additions and 45 deletions

View File

@ -584,19 +584,13 @@ void CFrame::DoStop()
Core::Stop();
/*
This is needed together with the option to not "delete g_EmuThread" in Core.cpp, because then
we have to wait a moment before GetState() == CORE_UNINITIALIZED so that UpdateGUI() works.
It's also needed when a WaitForSingleObject() has timed out so that the ShutDown() process
has continued without all threads having come to a rest. It's not compatible with the
SETUP_TIMER_WAITING option (because the Stop returns before it's finished).
Without this we just see the gray CPanel background because the ISO list will not be displayed.
*/
#ifndef SETUP_TIMER_WAITING
if (bRenderToMain)
while(Core::GetState() != Core::CORE_UNINITIALIZED) SLEEP(10);
#endif
#ifdef SETUP_TIMER_WAITING
// Idle-wait for core to completely shut down (without this wait the
// GameCtrlPanel is restored to a state where we can open another game
// and effectively crash Dolphin)
while(Core::isRunning())
SLEEP(10);
#endif
UpdateGUI();
}
@ -828,7 +822,7 @@ void CFrame::UpdateGUI()
#endif
// Save status
bool initialized = Core::GetState() != Core::CORE_UNINITIALIZED;
bool initialized = Core::isRunning();
bool running = Core::GetState() == Core::CORE_RUN;
bool paused = Core::GetState() == Core::CORE_PAUSE;