mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-28 11:49:06 +00:00
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.
This commit is contained in:
parent
2536e37ec5
commit
63546b4f2e
3 changed files with 21 additions and 18 deletions
|
@ -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
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue