Better updating of cheat status in various situations, and fix an exception thrown when unfreezing an address with the hex editor
This commit is contained in:
parent
6d741f4bfc
commit
1ad3b83d83
|
@ -1097,7 +1097,13 @@ namespace BizHawk.Client.EmuHawk
|
|||
VirtualPadMenuItem.ShortcutKeyDisplayString = Global.Config.HotkeyBindings["Virtual Pad"].Bindings;
|
||||
TraceLoggerMenuItem.ShortcutKeyDisplayString = Global.Config.HotkeyBindings["Trace Logger"].Bindings;
|
||||
TraceLoggerMenuItem.Enabled = Global.Emulator.CoreComm.CpuTraceAvailable;
|
||||
CheatsMenuItem.Enabled = !(Global.Emulator is NullEmulator);
|
||||
CheatsMenuItem.Enabled =
|
||||
HexEditorMenuItem.Enabled =
|
||||
RamSearchMenuItem.Enabled =
|
||||
RamWatchMenuItem.Enabled =
|
||||
TAStudioMenuItem.Enabled =
|
||||
VirtualPadMenuItem.Enabled =
|
||||
!(Global.Emulator is NullEmulator);
|
||||
}
|
||||
|
||||
private void ToolBoxMenuItem_Click(object sender, EventArgs e)
|
||||
|
|
|
@ -45,7 +45,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
PlayRecordStatusButton.Visible = false;
|
||||
AVIStatusLabel.Visible = false;
|
||||
SetPauseStatusbarIcon();
|
||||
UpdateCheatStatus();
|
||||
ToolHelpers.UpdateCheatRelatedTools(null, null);
|
||||
RebootStatusBarIcon.Visible = false;
|
||||
}
|
||||
|
||||
|
@ -3657,7 +3657,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
Global.AutofireStickyXORAdapter.ClearStickies();
|
||||
|
||||
RewireSound();
|
||||
|
||||
ToolHelpers.UpdateCheatRelatedTools(null, null);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -780,22 +780,13 @@ namespace BizHawk.Client.EmuHawk
|
|||
{
|
||||
// TODO: can't unfreeze address 0??
|
||||
Global.CheatList.RemoveRange(
|
||||
Global.CheatList.Where(x => x.Contains(address))
|
||||
Global.CheatList.Where(x => x.Contains(address)).ToList()
|
||||
);
|
||||
}
|
||||
|
||||
MemoryViewerBox.Refresh();
|
||||
}
|
||||
|
||||
private void UpdateRelatedDialogs()
|
||||
{
|
||||
GlobalWin.Tools.UpdateValues<RamWatch>();
|
||||
GlobalWin.Tools.UpdateValues<RamSearch>();
|
||||
GlobalWin.Tools.UpdateValues<Cheats>();
|
||||
GlobalWin.MainForm.UpdateCheatStatus();
|
||||
UpdateValues();
|
||||
}
|
||||
|
||||
// TODO refactor to int?
|
||||
private void FreezeAddress(int address)
|
||||
{
|
||||
|
@ -813,8 +804,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
watch,
|
||||
watch.Value ?? 0));
|
||||
|
||||
MemoryViewerBox.Refresh();
|
||||
UpdateRelatedDialogs();
|
||||
ToolHelpers.UpdateCheatRelatedTools(null, null);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1446,7 +1436,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
}
|
||||
}
|
||||
|
||||
UpdateRelatedDialogs();
|
||||
ToolHelpers.UpdateCheatRelatedTools(null, null);
|
||||
}
|
||||
|
||||
private void UnfreezeAllMenuItem_Click(object sender, EventArgs e)
|
||||
|
|
Loading…
Reference in New Issue