summaryrefslogtreecommitdiff
path: root/Source/Core/DolphinWX/Src/FrameTools.cpp
diff options
context:
space:
mode:
authorXTra.KrazzY <XTra.KrazzY@gmail.com>2009-06-26 22:36:44 +0000
committerXTra.KrazzY <XTra.KrazzY@gmail.com>2009-06-26 22:36:44 +0000
commit46b0fd3c9633f86becd679460c53ec68664d6370 (patch)
tree49d32ee01a52a02943ac8afe774a01dcc4aa569e /Source/Core/DolphinWX/Src/FrameTools.cpp
parent8a6fcdc2bc1856d12c5b3f0dd99fa8f45e022781 (diff)
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
Diffstat (limited to 'Source/Core/DolphinWX/Src/FrameTools.cpp')
-rw-r--r--Source/Core/DolphinWX/Src/FrameTools.cpp22
1 files changed, 8 insertions, 14 deletions
diff --git a/Source/Core/DolphinWX/Src/FrameTools.cpp b/Source/Core/DolphinWX/Src/FrameTools.cpp
index 091865f79e..d7cda0e5dd 100644
--- a/Source/Core/DolphinWX/Src/FrameTools.cpp
+++ b/Source/Core/DolphinWX/Src/FrameTools.cpp
@@ -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;