Debugger: Fixed debugger refresh bug when memory tools were opened

This commit is contained in:
Sour 2020-05-07 23:06:40 -04:00
parent bfc9e782a5
commit 3638474c99
2 changed files with 10 additions and 7 deletions

View file

@ -71,7 +71,7 @@ namespace Mesen.GUI.Debugger
}
}
public static DebugWorkspace GetWorkspace()
public static DebugWorkspace GetWorkspace(bool refreshState = true)
{
string romName = InteropEmu.GetRomInfo().GetRomName();
if(_workspace == null || _romName != romName) {
@ -95,9 +95,11 @@ namespace Mesen.GUI.Debugger
}
}
//Send breakpoints & labels to emulation core (even if the same game is running)
BreakpointManager.SetBreakpoints(_workspace.Breakpoints);
LabelManager.RefreshLabels();
if(refreshState) {
//Send breakpoints & labels to emulation core (even if the same game is running)
BreakpointManager.SetBreakpoints(_workspace.Breakpoints);
LabelManager.RefreshLabels();
}
return _workspace;
}

View file

@ -239,7 +239,7 @@ namespace Mesen.GUI.Debugger
private void InitTblMappings()
{
DebugWorkspace workspace = DebugWorkspaceManager.GetWorkspace();
DebugWorkspace workspace = DebugWorkspaceManager.GetWorkspace(false);
if(workspace.TblMappings != null && workspace.TblMappings.Count > 0) {
var tblDict = TblLoader.ToDictionary(workspace.TblMappings.ToArray());
if(tblDict != null) {
@ -364,9 +364,10 @@ namespace Mesen.GUI.Debugger
return;
}
if(DebugWorkspaceManager.GetWorkspace() != this._previousWorkspace) {
DebugWorkspace workspace = DebugWorkspaceManager.GetWorkspace(false);
if(workspace != this._previousWorkspace) {
this.InitTblMappings();
_previousWorkspace = DebugWorkspaceManager.GetWorkspace();
_previousWorkspace = workspace;
}
if(this.tabMain.SelectedTab == this.tpgAccessCounters) {