Fix Hex Editor to show cheat value on frozen addresses, and some fix ups in misc bugs that also contributed to this problem. Note: hex editor still will show some dubious behavior when viewing in one byte size and having cheats in another, that kind of mess will have to be sorted out in another commit
This commit is contained in:
parent
a399dbe91e
commit
377ab3b4ea
|
@ -87,7 +87,7 @@ namespace BizHawk.Client.Common
|
|||
|
||||
public int? Value
|
||||
{
|
||||
get { return _watch.Value; }
|
||||
get { return IsSeparator ? (int?)null : _val; }
|
||||
}
|
||||
|
||||
public bool? BigEndian
|
||||
|
|
|
@ -48,6 +48,14 @@ namespace BizHawk.Client.Common
|
|||
get { return _cheatList[index]; }
|
||||
}
|
||||
|
||||
public Cheat this[MemoryDomain domain, int address]
|
||||
{
|
||||
get
|
||||
{
|
||||
return _cheatList.FirstOrDefault(cheat => cheat.Domain == domain && cheat.Address == address);
|
||||
}
|
||||
}
|
||||
|
||||
public void Pulse()
|
||||
{
|
||||
_cheatList.ForEach(cheat => cheat.Pulse());
|
||||
|
@ -94,11 +102,6 @@ namespace BizHawk.Client.Common
|
|||
Changes = false;
|
||||
}
|
||||
|
||||
public void Update()
|
||||
{
|
||||
_cheatList.ForEach(x => x.Pulse());
|
||||
}
|
||||
|
||||
public void Add(Cheat cheat)
|
||||
{
|
||||
if (cheat.IsSeparator)
|
||||
|
|
|
@ -2538,6 +2538,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
// client input-related duties
|
||||
GlobalWin.OSD.ClearGUIText();
|
||||
|
||||
Global.CheatList.Pulse();
|
||||
if (!isTurboing)
|
||||
{
|
||||
GlobalWin.Tools.UpdateToolsBefore();
|
||||
|
@ -2588,7 +2589,6 @@ namespace BizHawk.Client.EmuHawk
|
|||
|
||||
coreskipaudio = Global.ClientControls["Turbo"] && _currAviWriter == null;
|
||||
|
||||
Global.CheatList.Pulse();
|
||||
Global.Emulator.FrameAdvance(!_throttle.skipnextframe || _currAviWriter != null, !coreskipaudio);
|
||||
GlobalWin.DisplayManager.NeedsToPaint = true;
|
||||
Global.CheatList.Pulse();
|
||||
|
|
|
@ -527,7 +527,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
{
|
||||
if (_addr + k < _domain.Size)
|
||||
{
|
||||
rowStr.Append(Remap(_domain.PeekByte(_addr + k)));
|
||||
rowStr.Append(Remap(MakeByte(_addr + k)));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -537,8 +537,20 @@ namespace BizHawk.Client.EmuHawk
|
|||
return rowStr.ToString();
|
||||
}
|
||||
|
||||
private byte MakeByte(int address)
|
||||
{
|
||||
return Global.CheatList.IsActive(_domain, address)
|
||||
? (byte) Global.CheatList[_domain, address].Value.Value
|
||||
: _domain.PeekByte(address);
|
||||
}
|
||||
|
||||
private int MakeValue(int address)
|
||||
{
|
||||
if (Global.CheatList.IsActive(_domain, address))
|
||||
{
|
||||
return Global.CheatList[_domain, address].Value.Value;
|
||||
}
|
||||
|
||||
switch (_dataSize)
|
||||
{
|
||||
default:
|
||||
|
|
Loading…
Reference in New Issue