use GlobalWin.Game less
This commit is contained in:
parent
ba939466df
commit
597e010faf
|
@ -47,7 +47,7 @@ namespace BizHawk.Client.EmuHawk
|
||||||
protected virtual void FastUpdateBefore() { }
|
protected virtual void FastUpdateBefore() { }
|
||||||
protected virtual void FastUpdateAfter() { }
|
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))
|
if (!Directory.Exists(path))
|
||||||
{
|
{
|
||||||
|
@ -58,7 +58,7 @@ namespace BizHawk.Client.EmuHawk
|
||||||
{
|
{
|
||||||
FileName = !string.IsNullOrWhiteSpace(currentFile)
|
FileName = !string.IsNullOrWhiteSpace(currentFile)
|
||||||
? Path.GetFileName(currentFile)
|
? Path.GetFileName(currentFile)
|
||||||
: $"{GlobalWin.Game.FilesystemSafeName()}.{fileExt}",
|
: $"{Game.FilesystemSafeName()}.{fileExt}",
|
||||||
InitialDirectory = path,
|
InitialDirectory = path,
|
||||||
Filter = new FilesystemFilterSet(new FilesystemFilter(fileType, new[] { fileExt })).ToString(),
|
Filter = new FilesystemFilterSet(new FilesystemFilter(fileType, new[] { fileExt })).ToString(),
|
||||||
RestoreDirectory = true
|
RestoreDirectory = true
|
||||||
|
|
|
@ -779,7 +779,7 @@ namespace BizHawk.Client.EmuHawk
|
||||||
|
|
||||||
public string GenerateDefaultCheatFilename()
|
public string GenerateDefaultCheatFilename()
|
||||||
{
|
{
|
||||||
var path = _config.PathEntries.CheatsAbsolutePath(GlobalWin.Game.System);
|
var path = _config.PathEntries.CheatsAbsolutePath(_game.System);
|
||||||
|
|
||||||
var f = new FileInfo(path);
|
var f = new FileInfo(path);
|
||||||
if (f.Directory != null && f.Directory.Exists == false)
|
if (f.Directory != null && f.Directory.Exists == false)
|
||||||
|
@ -787,7 +787,7 @@ namespace BizHawk.Client.EmuHawk
|
||||||
f.Directory.Create();
|
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)
|
public void UpdateCheatRelatedTools(object sender, CheatCollection.CheatListEventArgs e)
|
||||||
|
|
Loading…
Reference in New Issue