use GlobalWin.Game less

This commit is contained in:
adelikat 2020-06-11 18:31:32 -05:00
parent ba939466df
commit 597e010faf
2 changed files with 4 additions and 4 deletions

View File

@ -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

View File

@ -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)