summaryrefslogtreecommitdiff
path: root/Source/Core/DolphinWX/FrameTools.cpp
diff options
context:
space:
mode:
authorAnthony <Helios747@users.noreply.github.com>2016-10-29 00:16:09 -0500
committerGitHub <noreply@github.com>2016-10-29 00:16:09 -0500
commit26902d89e89de46d43adf11a194ea1ef84b9f4da (patch)
tree75cbd75513e55300bd5f1c14e41cab6be46c7bb3 /Source/Core/DolphinWX/FrameTools.cpp
parent476cf3803d6e276d67cdbc016c28cd1a51e2fd88 (diff)
parent63546b4f2e6ca7926e6649c551c654e15e06b0cd (diff)
Merge pull request #4377 from aldelaro5/fix-centerPc-on-toggleBreakpoint
Fix unnecessary Center PC calls in the CodeWindow
Diffstat (limited to 'Source/Core/DolphinWX/FrameTools.cpp')
-rw-r--r--Source/Core/DolphinWX/FrameTools.cpp16
1 files changed, 9 insertions, 7 deletions
diff --git a/Source/Core/DolphinWX/FrameTools.cpp b/Source/Core/DolphinWX/FrameTools.cpp
index a4e3a0ae52..7380583fe9 100644
--- a/Source/Core/DolphinWX/FrameTools.cpp
+++ b/Source/Core/DolphinWX/FrameTools.cpp
@@ -523,13 +523,15 @@ void CFrame::OnPlay(wxCommandEvent& WXUNUSED(event))
// Core is initialized and emulator is running
if (UseDebugger)
{
- CPU::EnableStepping(!CPU::IsStepping());
-
- wxThread::Sleep(20);
- g_pCodeWindow->JumpToAddress(PC);
- g_pCodeWindow->Repopulate();
- // Update toolbar with Play/Pause status
- UpdateGUI();
+ bool was_stopped = CPU::IsStepping();
+ CPU::EnableStepping(!was_stopped);
+ // When the CPU stops it generates a IDM_UPDATE_DISASM_DIALOG which automatically refreshes
+ // the UI, the UI only needs to be refreshed manually when unpausing.
+ if (was_stopped)
+ {
+ g_pCodeWindow->Repopulate();
+ UpdateGUI();
+ }
}
else
{