Watch object - update the PeekAddress() function to update the prev and changecount values. Fix Ram Search and Ram Watch UpdateValues() functions based on this change

This commit is contained in:
andres.delikat 2011-09-12 23:36:27 +00:00
parent 33a8d1ee0c
commit 0022b60b4f
3 changed files with 5 additions and 9 deletions

View File

@ -81,12 +81,7 @@ namespace BizHawk.MultiClient
sortedCol = ""; sortedCol = "";
for (int x = 0; x < searchList.Count; x++) for (int x = 0; x < searchList.Count; x++)
{ {
searchList[x].prev = searchList[x].value;
searchList[x].PeekAddress(Domain); searchList[x].PeekAddress(Domain);
if (searchList[x].prev != searchList[x].value)
searchList[x].changecount++;
} }
if (AutoSearchCheckBox.Checked) if (AutoSearchCheckBox.Checked)
DoSearch(); DoSearch();

View File

@ -66,15 +66,11 @@ namespace BizHawk.MultiClient
public void UpdateValues() public void UpdateValues()
{ {
if ((!this.IsHandleCreated || this.IsDisposed) && !Global.Config.DisplayRamWatch) return; if ((!this.IsHandleCreated || this.IsDisposed) && !Global.Config.DisplayRamWatch) return;
for (int x = 0; x < watchList.Count; x++) for (int x = 0; x < watchList.Count; x++)
{ {
watchList[x].prev = watchList[x].value;
watchList[x].PeekAddress(Domain); watchList[x].PeekAddress(Domain);
if (watchList[x].value != watchList[x].prev)
watchList[x].changecount++;
} }
if (Global.Config.DisplayRamWatch) if (Global.Config.DisplayRamWatch)

View File

@ -161,6 +161,8 @@ namespace BizHawk.MultiClient
if (type == atype.SEPARATOR) if (type == atype.SEPARATOR)
return; return;
prev = value;
switch (type) switch (type)
{ {
case atype.BYTE: case atype.BYTE:
@ -173,6 +175,9 @@ namespace BizHawk.MultiClient
PeekDWord(domain); PeekDWord(domain);
break; break;
} }
if (value != prev)
changecount++;
} }
private void PokeByte(MemoryDomain domain) private void PokeByte(MemoryDomain domain)