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:
|
||||
//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>
|
||||
/// A winform designed to search through ram values
|
||||
|
@ -512,6 +513,7 @@ namespace BizHawk.MultiClient
|
|||
{
|
||||
OutputLabel.Text = MakeAddressString(undoList.Count - searchList.Count) + " restored";
|
||||
searchList = new List<Watch>(undoList);
|
||||
prevList = new List<Watch>(undoList);
|
||||
undoList.Clear();
|
||||
DisplaySearchList();
|
||||
}
|
||||
|
@ -752,7 +754,14 @@ namespace BizHawk.MultiClient
|
|||
if (Global.Config.RamSearchPreviousAs == 2) //If Previous frame
|
||||
return searchList[pos].prev;
|
||||
else
|
||||
return prevList[pos].value;
|
||||
{
|
||||
if (pos < prevList.Count)
|
||||
return prevList[pos].value;
|
||||
else
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private bool DoPreviousValue()
|
||||
|
|
Loading…
Reference in New Issue