diff --git a/BizHawk.Client.EmuHawk/tools/Cheats/Cheats.cs b/BizHawk.Client.EmuHawk/tools/Cheats/Cheats.cs index 0603a8a9b0..74d11e8069 100644 --- a/BizHawk.Client.EmuHawk/tools/Cheats/Cheats.cs +++ b/BizHawk.Client.EmuHawk/tools/Cheats/Cheats.cs @@ -118,11 +118,6 @@ namespace BizHawk.Client.EmuHawk public bool AskSave() { - if (Global.Config.SupressAskSave) - { - return true; - } - if (Global.CheatList.Changes) { GlobalWin.Sound.StopSound(); diff --git a/BizHawk.Client.EmuHawk/tools/Lua/LuaConsole.cs b/BizHawk.Client.EmuHawk/tools/Lua/LuaConsole.cs index 0dee950912..3b1a4ab5ba 100644 --- a/BizHawk.Client.EmuHawk/tools/Lua/LuaConsole.cs +++ b/BizHawk.Client.EmuHawk/tools/Lua/LuaConsole.cs @@ -476,11 +476,6 @@ namespace BizHawk.Client.EmuHawk public bool AskSave() { - if (Global.Config.SupressAskSave) - { - return true; - } - if (_luaList.Changes) { GlobalWin.Sound.StopSound(); diff --git a/BizHawk.Client.EmuHawk/tools/ToolManager.cs b/BizHawk.Client.EmuHawk/tools/ToolManager.cs index df9d6dc8be..cf6886c6ae 100644 --- a/BizHawk.Client.EmuHawk/tools/ToolManager.cs +++ b/BizHawk.Client.EmuHawk/tools/ToolManager.cs @@ -8,9 +8,9 @@ namespace BizHawk.Client.EmuHawk { public class ToolManager { - //TODO: merge ToolHelper code where logical - //For instance, add an IToolForm property called UsesCheats, so that a UpdateCheatRelatedTools() method can update all tools of this type - //Also a UsesRam, and similar method + // TODO: merge ToolHelper code where logical + // For instance, add an IToolForm property called UsesCheats, so that a UpdateCheatRelatedTools() method can update all tools of this type + // Also a UsesRam, and similar method private List _tools = new List(); @@ -147,6 +147,11 @@ namespace BizHawk.Client.EmuHawk /// public bool AskSave() { + if (Global.Config.SupressAskSave) // User has elected to not be nagged + { + return true; + } + foreach (var tool in _tools) { var result = tool.AskSave(); @@ -167,6 +172,11 @@ namespace BizHawk.Client.EmuHawk /// public bool AskSave() where T : IToolForm { + if (Global.Config.SupressAskSave) // User has elected to not be nagged + { + return true; + } + var tool = _tools.FirstOrDefault(x => x is T); if (tool != null) { diff --git a/BizHawk.Client.EmuHawk/tools/Watch/RamWatch.cs b/BizHawk.Client.EmuHawk/tools/Watch/RamWatch.cs index b1430348ef..4a2ee0395a 100644 --- a/BizHawk.Client.EmuHawk/tools/Watch/RamWatch.cs +++ b/BizHawk.Client.EmuHawk/tools/Watch/RamWatch.cs @@ -99,11 +99,6 @@ namespace BizHawk.Client.EmuHawk public bool AskSave() { - if (Global.Config.SupressAskSave) // User has elected to not be nagged - { - return true; - } - if (_watches.Changes) { GlobalWin.Sound.StopSound();