Fix so that tool dialogs such as Ram watch update on loadstate, Ram Watch - AddWatch() triggers Changes() function, Separator no longer shows Change Count = 0

This commit is contained in:
andres.delikat 2011-07-09 00:26:23 +00:00
parent 2cbc50143f
commit 16e332a72d
2 changed files with 19 additions and 8 deletions

View File

@ -1399,12 +1399,7 @@ namespace BizHawk.MultiClient
Global.Emulator.FrameAdvance(!throttle.skipnextframe); Global.Emulator.FrameAdvance(!throttle.skipnextframe);
//======================================= //=======================================
RamWatch1.UpdateValues(); UpdateTools();
RamSearch1.UpdateValues();
HexEditor1.UpdateValues();
NESNameTableViewer1.UpdateValues();
NESPPU1.UpdateValues();
TAStudio1.UpdateValues();
} }
@ -1414,6 +1409,19 @@ namespace BizHawk.MultiClient
Global.Sound.UpdateSound(NullSound.SilenceProvider); Global.Sound.UpdateSound(NullSound.SilenceProvider);
} }
/// <summary>
/// Update all tools that are frame dependent like Ram Search
/// </summary>
public void UpdateTools()
{
RamWatch1.UpdateValues();
RamSearch1.UpdateValues();
HexEditor1.UpdateValues();
NESNameTableViewer1.UpdateValues();
NESPPU1.UpdateValues();
TAStudio1.UpdateValues();
}
private void MakeScreenshot(string path) private void MakeScreenshot(string path)
{ {
var video = Global.Emulator.VideoProvider; var video = Global.Emulator.VideoProvider;
@ -1575,6 +1583,7 @@ namespace BizHawk.MultiClient
var reader = new StreamReader(path); var reader = new StreamReader(path);
Global.Emulator.LoadStateText(reader); Global.Emulator.LoadStateText(reader);
HandleMovieLoadState(reader); HandleMovieLoadState(reader);
UpdateTools();
reader.Close(); reader.Close();
Global.RenderPanel.AddMessage("Loaded state: " + name); Global.RenderPanel.AddMessage("Loaded state: " + name);
} }

View File

@ -239,6 +239,7 @@ namespace BizHawk.MultiClient
} }
if (column == 3) //Change Counts if (column == 3) //Change Counts
{ {
if (watchList[index].type != atype.SEPARATOR)
text = watchList[index].changecount.ToString(); text = watchList[index].changecount.ToString();
} }
if (column == 4) //Notes if (column == 4) //Notes
@ -455,7 +456,8 @@ namespace BizHawk.MultiClient
if (r.userSelected == true) if (r.userSelected == true)
{ {
watchList.Add(r.watch); watchList.Add(r.watch);
DisplayWatchList(); //TODO: Do I need these calls? Changes();
DisplayWatchList();
} }
} }