diff --git a/BizHawk.Client.Common/tools/CheatList.cs b/BizHawk.Client.Common/tools/CheatList.cs index 4c963801e7..fc53ec333a 100644 --- a/BizHawk.Client.Common/tools/CheatList.cs +++ b/BizHawk.Client.Common/tools/CheatList.cs @@ -103,7 +103,11 @@ namespace BizHawk.Client.Common public void Add(Cheat cheat) { - if (!cheat.IsSeparator) + if (cheat.IsSeparator) + { + _cheatList.Add(cheat); + } + else { cheat.Changed += CheatChanged; if (_cheatList.Any(x => x.Domain == cheat.Domain && x.Address == cheat.Address)) @@ -116,7 +120,6 @@ namespace BizHawk.Client.Common } } - _cheatList.Add(cheat); Changes = true; } diff --git a/BizHawk.Client.EmuHawk/tools/Cheats/CheatEdit.cs b/BizHawk.Client.EmuHawk/tools/Cheats/CheatEdit.cs index 359c9f9041..381fd2fb2a 100644 --- a/BizHawk.Client.EmuHawk/tools/Cheats/CheatEdit.cs +++ b/BizHawk.Client.EmuHawk/tools/Cheats/CheatEdit.cs @@ -266,7 +266,7 @@ namespace BizHawk.Client.EmuHawk { get { - Watch w = Watch.GenerateWatch( + Watch watch = Watch.GenerateWatch( ToolHelpers.DomainByName(DomainDropDown.SelectedItem.ToString()), AddressBox.ToRawInt(), GetCurrentSize(), @@ -274,7 +274,11 @@ namespace BizHawk.Client.EmuHawk NameBox.Text, BigEndianCheckBox.Checked); - return new Cheat(w, CompareBox.ToRawInt(), enabled: true); + return new Cheat( + watch, + ValueBox.ToRawInt(), + !String.IsNullOrWhiteSpace(CompareBox.Text) ? CompareBox.ToRawInt() : (int?)null + ); } }