diff --git a/src/BizHawk.Client.EmuHawk/tools/ToolFormBase.cs b/src/BizHawk.Client.EmuHawk/tools/ToolFormBase.cs index 5fab95a515..572523aeb3 100644 --- a/src/BizHawk.Client.EmuHawk/tools/ToolFormBase.cs +++ b/src/BizHawk.Client.EmuHawk/tools/ToolFormBase.cs @@ -47,7 +47,7 @@ namespace BizHawk.Client.EmuHawk protected virtual void FastUpdateBefore() { } protected virtual void FastUpdateAfter() { } - public static FileInfo OpenFileDialog(string currentFile, string path, string fileType, string fileExt) + public FileInfo OpenFileDialog(string currentFile, string path, string fileType, string fileExt) { if (!Directory.Exists(path)) { @@ -58,7 +58,7 @@ namespace BizHawk.Client.EmuHawk { FileName = !string.IsNullOrWhiteSpace(currentFile) ? Path.GetFileName(currentFile) - : $"{GlobalWin.Game.FilesystemSafeName()}.{fileExt}", + : $"{Game.FilesystemSafeName()}.{fileExt}", InitialDirectory = path, Filter = new FilesystemFilterSet(new FilesystemFilter(fileType, new[] { fileExt })).ToString(), RestoreDirectory = true diff --git a/src/BizHawk.Client.EmuHawk/tools/ToolManager.cs b/src/BizHawk.Client.EmuHawk/tools/ToolManager.cs index aef7a249c2..4ff2eb9c4f 100644 --- a/src/BizHawk.Client.EmuHawk/tools/ToolManager.cs +++ b/src/BizHawk.Client.EmuHawk/tools/ToolManager.cs @@ -779,7 +779,7 @@ namespace BizHawk.Client.EmuHawk public string GenerateDefaultCheatFilename() { - var path = _config.PathEntries.CheatsAbsolutePath(GlobalWin.Game.System); + var path = _config.PathEntries.CheatsAbsolutePath(_game.System); var f = new FileInfo(path); if (f.Directory != null && f.Directory.Exists == false) @@ -787,7 +787,7 @@ namespace BizHawk.Client.EmuHawk f.Directory.Create(); } - return Path.Combine(path, $"{GlobalWin.Game.FilesystemSafeName()}.cht"); + return Path.Combine(path, $"{_game.FilesystemSafeName()}.cht"); } public void UpdateCheatRelatedTools(object sender, CheatCollection.CheatListEventArgs e)