Cheats - when editing a cheat's domain, if the address is out of range, don't update, rather than create a separator, fixes #539
This commit is contained in:
parent
175862a5f3
commit
0213755d16
|
@ -309,9 +309,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
get { return _cheat; }
|
||||
}
|
||||
|
||||
public Cheat Cheat
|
||||
{
|
||||
get
|
||||
public Cheat GetCheat()
|
||||
{
|
||||
Cheat.COMPARISONTYPE comparisonType = Cheat.COMPARISONTYPE.NONE;
|
||||
var domain = MemoryDomains[DomainDropDown.SelectedItem.ToString()];
|
||||
|
@ -357,7 +355,6 @@ namespace BizHawk.Client.EmuHawk
|
|||
return Cheat.Separator;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void SetAddEvent(Action addCallback)
|
||||
{
|
||||
|
|
|
@ -177,17 +177,22 @@ namespace BizHawk.Client.EmuHawk
|
|||
|
||||
private void AddCheat()
|
||||
{
|
||||
Global.CheatList.Add(CheatEditor.Cheat);
|
||||
Global.CheatList.Add(CheatEditor.GetCheat());
|
||||
UpdateDialog();
|
||||
UpdateMessageLabel();
|
||||
}
|
||||
|
||||
private void EditCheat()
|
||||
{
|
||||
Global.CheatList.Exchange(CheatEditor.OriginalCheat, CheatEditor.Cheat);
|
||||
var newCheat = CheatEditor.GetCheat();
|
||||
|
||||
if (!newCheat.IsSeparator) // If a separator comes from the cheat editor something must have been invalid
|
||||
{
|
||||
Global.CheatList.Exchange(CheatEditor.OriginalCheat, newCheat);
|
||||
UpdateDialog();
|
||||
UpdateMessageLabel();
|
||||
}
|
||||
}
|
||||
|
||||
public void SaveConfigSettings()
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue