summaryrefslogtreecommitdiff
path: root/Source/Core/DolphinWX/FrameTools.cpp
diff options
context:
space:
mode:
authorSepalani <sepalani@hotmail.fr>2017-04-24 17:19:35 +0100
committerSepalani <sepalani@hotmail.fr>2017-04-24 17:32:15 +0100
commit4a553980693afaee07866165dcf44694faf6a06c (patch)
treed9fc4ae19199240bec708f5ccf57842b6f11bcb5 /Source/Core/DolphinWX/FrameTools.cpp
parentd1dc9d5a0ccbe17f47b74517a0636751de9f888c (diff)
DoStop() shouldn't unpause in debug mode
Diffstat (limited to 'Source/Core/DolphinWX/FrameTools.cpp')
-rw-r--r--Source/Core/DolphinWX/FrameTools.cpp13
1 files changed, 8 insertions, 5 deletions
diff --git a/Source/Core/DolphinWX/FrameTools.cpp b/Source/Core/DolphinWX/FrameTools.cpp
index e3f268f426..7022b89a3e 100644
--- a/Source/Core/DolphinWX/FrameTools.cpp
+++ b/Source/Core/DolphinWX/FrameTools.cpp
@@ -802,15 +802,16 @@ void CFrame::DoStop()
std::lock_guard<std::recursive_mutex> lk(keystate_lock);
wxMutexGuiEnter();
#endif
+
+ // Pause the state during confirmation and restore it afterwards
+ Core::State state = Core::GetState();
+
// Ask for confirmation in case the user accidentally clicked Stop / Escape
if (SConfig::GetInstance().bConfirmStop)
{
// Exit fullscreen to ensure it does not cover the stop dialog.
DoFullscreen(false);
- // Pause the state during confirmation and restore it afterwards
- Core::State state = Core::GetState();
-
// Do not pause if netplay is running as CPU thread might be blocked
// waiting on inputs
bool should_pause = !NetPlayDialog::GetNetPlayClient();
@@ -849,6 +850,7 @@ void CFrame::DoStop()
g_pCodeWindow->GetPanel<CBreakPointWindow>()->NotifyUpdate();
g_symbolDB.Clear();
Host_NotifyMapLoaded();
+ Core::SetState(state);
}
// TODO: Show the author/description dialog here
@@ -877,8 +879,9 @@ bool CFrame::TriggerSTMPowerEvent()
return false;
Core::DisplayMessage("Shutting down", 30000);
- // Unpause because gracefully shutting down needs the game to actually request a shutdown
- if (Core::GetState() == Core::State::Paused)
+ // Unpause because gracefully shutting down needs the game to actually request a shutdown.
+ // Do not unpause in debug mode to allow debugging until the complete shutdown.
+ if (Core::GetState() == Core::State::Paused && !UseDebugger)
DoPause();
ProcessorInterface::PowerButton_Tap();
m_confirmStop = false;