Ram Search - Make DoUndo() set the previous value to the current value. Better would be to keep a previous value undo list and restore that, but this is adequate for preventing crashes.
This commit is contained in:
parent
3bab049363
commit
89c5dcb9ec
|
@ -13,6 +13,7 @@ namespace BizHawk.MultiClient
|
||||||
{
|
{
|
||||||
//TODO:
|
//TODO:
|
||||||
//Sorting by Prev only does "Since prev frame", find a way to integrate the various prev options
|
//Sorting by Prev only does "Since prev frame", find a way to integrate the various prev options
|
||||||
|
//In DoUndo, prevList is set to searchList, instead how about a UndoPrev, so that undo restores both the current and previous values
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// A winform designed to search through ram values
|
/// A winform designed to search through ram values
|
||||||
|
@ -512,6 +513,7 @@ namespace BizHawk.MultiClient
|
||||||
{
|
{
|
||||||
OutputLabel.Text = MakeAddressString(undoList.Count - searchList.Count) + " restored";
|
OutputLabel.Text = MakeAddressString(undoList.Count - searchList.Count) + " restored";
|
||||||
searchList = new List<Watch>(undoList);
|
searchList = new List<Watch>(undoList);
|
||||||
|
prevList = new List<Watch>(undoList);
|
||||||
undoList.Clear();
|
undoList.Clear();
|
||||||
DisplaySearchList();
|
DisplaySearchList();
|
||||||
}
|
}
|
||||||
|
@ -752,7 +754,14 @@ namespace BizHawk.MultiClient
|
||||||
if (Global.Config.RamSearchPreviousAs == 2) //If Previous frame
|
if (Global.Config.RamSearchPreviousAs == 2) //If Previous frame
|
||||||
return searchList[pos].prev;
|
return searchList[pos].prev;
|
||||||
else
|
else
|
||||||
return prevList[pos].value;
|
{
|
||||||
|
if (pos < prevList.Count)
|
||||||
|
return prevList[pos].value;
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private bool DoPreviousValue()
|
private bool DoPreviousValue()
|
||||||
|
|
Loading…
Reference in New Issue