New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix unnecessary Center PC calls in the CodeWindow #4377
Fix unnecessary Center PC calls in the CodeWindow #4377
Conversation
Source/Core/DolphinWX/Debugger/CodeWindow.cpp, line 391 at r1 (raw file):
If you don't need the event to be processed right now, you might prefer Comments from Reviewable |
Source/Core/DolphinWX/Debugger/CodeWindow.cpp, line 389 at r1 (raw file):
Are braces necessary here? Comments from Reviewable |
Otherwise, LGTM. |
c9054fc
to
281153e
Compare
Review status: 0 of 2 files reviewed at latest revision, 2 unresolved discussions. Source/Core/DolphinWX/Debugger/CodeWindow.cpp, line 389 at r1 (raw file):
|
Comments from Reviewable |
I suspect those braces were for scope limiting, to avoid Can't speak much for the correctness of the rest of the code, but style-wise LGTM. |
@lioncash and @leoetlino anything else to review here? Would really like this regression fix to be merged. @phire , @EmptyChaos ? |
Review status: 0 of 2 files reviewed at latest revision, 2 unresolved discussions. Source/Core/DolphinWX/FrameTools.cpp, line 528 at r2 (raw file):
This sleep line should be removed. It's legacy code from when Source/Core/DolphinWX/Debugger/CodeWindow.cpp, line 613 at r2 (raw file):
I'm pretty sure the Comments from Reviewable |
281153e
to
fd6f93a
Compare
Review status: 0 of 2 files reviewed at latest revision, 2 unresolved discussions. Source/Core/DolphinWX/FrameTools.cpp, line 528 at r2 (raw file):
|
Review status: 0 of 2 files reviewed at latest revision, 1 unresolved discussion. Source/Core/DolphinWX/Debugger/CodeWindow.cpp, line 613 at r2 (raw file):
|
fd6f93a
to
27ef940
Compare
Review status: 0 of 3 files reviewed at latest revision, 1 unresolved discussion. Source/Core/DolphinWX/Debugger/CodeWindow.cpp, line 613 at r2 (raw file):
|
Review status: 0 of 3 files reviewed at latest revision, 3 unresolved discussions. Source/Core/DolphinWX/FrameTools.cpp, line 530 at r3 (raw file):
Actually, looking at this again, the 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();
} Source/Core/DolphinWX/Debugger/CodeWindow.cpp, line 210 at r4 (raw file):
Repopulate(false); Source/Core/DolphinWX/Debugger/CodeWindow.cpp, line 216 at r4 (raw file):
Repopulate(false); Comments from Reviewable |
27ef940
to
a485646
Compare
Review status: 0 of 3 files reviewed at latest revision, 3 unresolved discussions. Source/Core/DolphinWX/FrameTools.cpp, line 530 at r3 (raw file):
|
Review status: 0 of 3 files reviewed at latest revision, 1 unresolved discussion. Source/Core/DolphinWX/FrameTools.cpp, line 528 at r5 (raw file):
The lines above need to be removed. They're redundant with the rest of the code block, you're pausing then unpausing immediately because of the dual Comments from Reviewable |
a485646
to
24775cb
Compare
Review status: 0 of 3 files reviewed at latest revision, 1 unresolved discussion. Source/Core/DolphinWX/FrameTools.cpp, line 528 at r5 (raw file):
|
Review status: 0 of 3 files reviewed at latest revision, 1 unresolved discussion. Source/Core/DolphinWX/FrameTools.cpp, line 528 at r5 (raw file):
|
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.
24775cb
to
63546b4
Compare
Review status: 0 of 3 files reviewed at latest revision, 1 unresolved discussion. Source/Core/DolphinWX/FrameTools.cpp, line 528 at r5 (raw file):
|
Review status: 0 of 3 files reviewed at latest revision, all discussions resolved. Comments from Reviewable |
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.
The regression was due to an improper fix I did in pr #4218 and was undone in the Hi-dpi pr. Not only it didn't made sense to have the center pc in the repopulate function, but there was other ways to cause a center for the events that desires one.
This change is