diff --git a/src/BizHawk.Client.Common/tools/Watch/ByteWatch.cs b/src/BizHawk.Client.Common/tools/Watch/ByteWatch.cs index 3004034a58..30b81c93db 100644 --- a/src/BizHawk.Client.Common/tools/Watch/ByteWatch.cs +++ b/src/BizHawk.Client.Common/tools/Watch/ByteWatch.cs @@ -1,7 +1,6 @@ using System; using System.Collections.Generic; using System.Globalization; -using System.Linq; using BizHawk.Common.StringExtensions; using BizHawk.Emulation.Common; @@ -126,16 +125,6 @@ namespace BizHawk.Client.Common break; } - if (Global.CheatList.Contains(Domain, Address)) - { - var cheat = Global.CheatList.FirstOrDefault(c => c.Address == Address && c.Domain == Domain); - - if (cheat != (Cheat)null) - { - cheat.PokeValue(val); - } - } - PokeByte(val); return true; } diff --git a/src/BizHawk.Client.Common/tools/Watch/DWordWatch.cs b/src/BizHawk.Client.Common/tools/Watch/DWordWatch.cs index aa3f53aed1..c11d1902dd 100644 --- a/src/BizHawk.Client.Common/tools/Watch/DWordWatch.cs +++ b/src/BizHawk.Client.Common/tools/Watch/DWordWatch.cs @@ -152,15 +152,6 @@ namespace BizHawk.Client.Common break; } - if (Global.CheatList.Contains(Domain, Address)) - { - var cheat = Global.CheatList.FirstOrDefault(c => c.Address == Address && c.Domain == Domain); - if (cheat != (Cheat)null) - { - cheat.PokeValue((int)val); - } - } - PokeDWord(val); return true; } diff --git a/src/BizHawk.Client.Common/tools/Watch/WordWatch.cs b/src/BizHawk.Client.Common/tools/Watch/WordWatch.cs index 70ea9f5124..d6080a2723 100644 --- a/src/BizHawk.Client.Common/tools/Watch/WordWatch.cs +++ b/src/BizHawk.Client.Common/tools/Watch/WordWatch.cs @@ -1,7 +1,6 @@ using System; using System.Collections.Generic; using System.Globalization; -using System.Linq; using BizHawk.Common.StringExtensions; using BizHawk.Emulation.Common; @@ -135,15 +134,6 @@ namespace BizHawk.Client.Common break; } - if (Global.CheatList.Contains(Domain, Address)) - { - var cheat = Global.CheatList.FirstOrDefault(c => c.Address == Address && c.Domain == Domain); - if (cheat != (Cheat)null) - { - cheat.PokeValue(val); - } - } - PokeWord(val); return true; } diff --git a/src/BizHawk.Client.EmuHawk/tools/Watch/RamPoke.cs b/src/BizHawk.Client.EmuHawk/tools/Watch/RamPoke.cs index aae9479c16..e365d40f9f 100644 --- a/src/BizHawk.Client.EmuHawk/tools/Watch/RamPoke.cs +++ b/src/BizHawk.Client.EmuHawk/tools/Watch/RamPoke.cs @@ -91,7 +91,23 @@ namespace BizHawk.Client.EmuHawk private void Ok_Click(object sender, EventArgs e) { - var success = _watchList.All(watch => watch.Poke(ValueBox.Text)); + var success = true; + foreach (var watch in _watchList) + { + var result = watch.Poke(ValueBox.Text); + if (result) + { + var cheat = Global.CheatList.FirstOrDefault(c => c.Address == watch.Address && c.Domain == watch.Domain); + if (cheat != (Cheat)null) + { + cheat.PokeValue(watch.Value); + } + } + else + { + success = false; + } + } ParentTool?.UpdateValues(ToolFormUpdateType.General);