diff options
| author | aldelaro5 <aldelaro5@gmail.com> | 2016-10-22 17:20:06 -0400 |
|---|---|---|
| committer | aldelaro5 <aldelaro5@gmail.com> | 2016-10-29 01:08:27 -0400 |
| commit | 63546b4f2e6ca7926e6649c551c654e15e06b0cd (patch) | |
| tree | 4fb10ed1aa5b5dae275402a4ad6906b5b3bcdfff /Source/Core/DolphinWX/FrameTools.cpp | |
| parent | 2536e37ec518c8d0e949ec7780ee0fb53e8b066e (diff) | |
Fix unnecessary Center PC calls in the CodeWindow
This not only fixes a regression where toggling a breakpoint using the CodeWindow would cause a Center PC, but it also removes several redundant JumpToAddress(PC) calls.
Diffstat (limited to 'Source/Core/DolphinWX/FrameTools.cpp')
| -rw-r--r-- | Source/Core/DolphinWX/FrameTools.cpp | 16 |
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 { |
