diff --git a/src/BizHawk.Client.Common/Global.cs b/src/BizHawk.Client.Common/Global.cs
index e8ebaa7f44..5c2d61e325 100644
--- a/src/BizHawk.Client.Common/Global.cs
+++ b/src/BizHawk.Client.Common/Global.cs
@@ -1,11 +1,7 @@
-using BizHawk.Emulation.Common;
-
-// ReSharper disable StyleCop.SA1401
-namespace BizHawk.Client.Common
+namespace BizHawk.Client.Common
{
public static class Global
{
- public static GameInfo Game { get; set; }
public static IMovieSession MovieSession { get; set; }
public static InputManager InputManager { get; } = new InputManager();
}
diff --git a/src/BizHawk.Client.EmuHawk/AVOut/SynclessRecordingTools.cs b/src/BizHawk.Client.EmuHawk/AVOut/SynclessRecordingTools.cs
index a5da0fdc9a..2b4fa0842c 100644
--- a/src/BizHawk.Client.EmuHawk/AVOut/SynclessRecordingTools.cs
+++ b/src/BizHawk.Client.EmuHawk/AVOut/SynclessRecordingTools.cs
@@ -33,7 +33,7 @@ namespace BizHawk.Client.EmuHawk
{
var ofd = new OpenFileDialog
{
- FileName = $"{Global.Game.FilesystemSafeName()}.syncless.txt",
+ FileName = $"{GlobalWin.Game.FilesystemSafeName()}.syncless.txt",
InitialDirectory = GlobalWin.Config.PathEntries.AvAbsolutePath()
};
diff --git a/src/BizHawk.Client.EmuHawk/Api/ClientApi.cs b/src/BizHawk.Client.EmuHawk/Api/ClientApi.cs
index 9624b38187..a035228895 100644
--- a/src/BizHawk.Client.EmuHawk/Api/ClientApi.cs
+++ b/src/BizHawk.Client.EmuHawk/Api/ClientApi.cs
@@ -122,7 +122,7 @@ namespace BizHawk.Client.EmuHawk
/// Load a savestate specified by its name
///
/// Savestate friendly name
- public static void LoadState(string name) => GlobalWin.MainForm.LoadState(Path.Combine(GlobalWin.Config.PathEntries.SaveStateAbsolutePath(Global.Game.System), $"{name}.State"), name, suppressOSD: false);
+ public static void LoadState(string name) => GlobalWin.MainForm.LoadState(Path.Combine(GlobalWin.Config.PathEntries.SaveStateAbsolutePath(GlobalWin.Game.System), $"{name}.State"), name, suppressOSD: false);
///
/// Raised before a quickload is done (just after pressing shortcut button)
@@ -202,7 +202,7 @@ namespace BizHawk.Client.EmuHawk
/// Save a state with specified name
///
/// Savestate friendly name
- public static void SaveState(string name) => GlobalWin.MainForm.SaveState(Path.Combine(GlobalWin.Config.PathEntries.SaveStateAbsolutePath(Global.Game.System), $"{name}.State"), name, fromLua: false);
+ public static void SaveState(string name) => GlobalWin.MainForm.SaveState(Path.Combine(GlobalWin.Config.PathEntries.SaveStateAbsolutePath(GlobalWin.Game.System), $"{name}.State"), name, fromLua: false);
///
/// Sets the extra padding added to the 'native' surface so that you can draw HUD elements in predictable placements
diff --git a/src/BizHawk.Client.EmuHawk/Api/Libraries/EmuApi.cs b/src/BizHawk.Client.EmuHawk/Api/Libraries/EmuApi.cs
index a186a7e2e9..d06e2c243e 100644
--- a/src/BizHawk.Client.EmuHawk/Api/Libraries/EmuApi.cs
+++ b/src/BizHawk.Client.EmuHawk/Api/Libraries/EmuApi.cs
@@ -145,7 +145,7 @@ namespace BizHawk.Client.EmuHawk
return default;
}
- public string GetSystemId() => Global.Game.System;
+ public string GetSystemId() => GlobalWin.Game.System;
public bool IsLagged()
{
diff --git a/src/BizHawk.Client.EmuHawk/Api/Libraries/GameInfoApi.cs b/src/BizHawk.Client.EmuHawk/Api/Libraries/GameInfoApi.cs
index 3e61d67831..d1f42dcf7a 100644
--- a/src/BizHawk.Client.EmuHawk/Api/Libraries/GameInfoApi.cs
+++ b/src/BizHawk.Client.EmuHawk/Api/Libraries/GameInfoApi.cs
@@ -9,23 +9,23 @@ namespace BizHawk.Client.EmuHawk
[OptionalService]
private IBoardInfo BoardInfo { get; set; }
- public string GetRomName() => Global.Game?.Name ?? "";
+ public string GetRomName() => GlobalWin.Game?.Name ?? "";
- public string GetRomHash() => Global.Game?.Hash ?? "";
+ public string GetRomHash() => GlobalWin.Game?.Hash ?? "";
- public bool InDatabase() => Global.Game?.NotInDatabase == false;
+ public bool InDatabase() => GlobalWin.Game?.NotInDatabase == false;
- public string GetStatus() => Global.Game?.Status.ToString();
+ public string GetStatus() => GlobalWin.Game?.Status.ToString();
- public bool IsStatusBad() => Global.Game?.IsRomStatusBad() != false;
+ public bool IsStatusBad() => GlobalWin.Game?.IsRomStatusBad() != false;
public string GetBoardType() => BoardInfo?.BoardName ?? "";
public Dictionary GetOptions()
{
var options = new Dictionary();
- if (Global.Game == null) return options;
- foreach (var option in Global.Game.GetOptionsDict()) options[option.Key] = option.Value;
+ if (GlobalWin.Game == null) return options;
+ foreach (var option in GlobalWin.Game.GetOptionsDict()) options[option.Key] = option.Value;
return options;
}
}
diff --git a/src/BizHawk.Client.EmuHawk/DisplayManager/OSDManager.cs b/src/BizHawk.Client.EmuHawk/DisplayManager/OSDManager.cs
index 96fbe30d70..7fd2f0c1f1 100644
--- a/src/BizHawk.Client.EmuHawk/DisplayManager/OSDManager.cs
+++ b/src/BizHawk.Client.EmuHawk/DisplayManager/OSDManager.cs
@@ -258,7 +258,7 @@ namespace BizHawk.Client.EmuHawk
///
public void DrawScreenInfo(IBlitter g)
{
- if (GlobalWin.Config.DisplayFrameCounter && !Global.Game.IsNullInstance())
+ if (GlobalWin.Config.DisplayFrameCounter && !GlobalWin.Game.IsNullInstance())
{
string message = MakeFrameCounter();
var point = GetCoordinates(g, GlobalWin.Config.FrameCounter, message);
@@ -270,7 +270,7 @@ namespace BizHawk.Client.EmuHawk
}
}
- if (GlobalWin.Config.DisplayInput && !Global.Game.IsNullInstance())
+ if (GlobalWin.Config.DisplayInput && !GlobalWin.Game.IsNullInstance())
{
if (Global.MovieSession.Movie.IsPlaying()
|| (Global.MovieSession.Movie.IsFinished() && GlobalWin.Emulator.Frame == Global.MovieSession.Movie.InputLogLength)) // Account for the last frame of the movie, the movie state is immediately "Finished" here but we still want to show the input
diff --git a/src/BizHawk.Client.EmuHawk/GlobalWin.cs b/src/BizHawk.Client.EmuHawk/GlobalWin.cs
index 77cf7402c4..6ce43e0904 100644
--- a/src/BizHawk.Client.EmuHawk/GlobalWin.cs
+++ b/src/BizHawk.Client.EmuHawk/GlobalWin.cs
@@ -44,5 +44,6 @@ namespace BizHawk.Client.EmuHawk
public static Config Config { get; set; }
public static FirmwareManager FirmwareManager { get; set; }
+ public static GameInfo Game { get; set; }
}
}
diff --git a/src/BizHawk.Client.EmuHawk/LogWindow.cs b/src/BizHawk.Client.EmuHawk/LogWindow.cs
index 12a52ea23b..dc9ca03fc5 100644
--- a/src/BizHawk.Client.EmuHawk/LogWindow.cs
+++ b/src/BizHawk.Client.EmuHawk/LogWindow.cs
@@ -137,7 +137,7 @@ namespace BizHawk.Client.EmuHawk
private void HideShowGameDbButton()
{
AddToGameDbBtn.Visible = Emulator.CanGenerateGameDBEntries()
- && (Global.Game.Status == RomStatus.Unknown || Global.Game.Status == RomStatus.NotInDatabase);
+ && (GlobalWin.Game.Status == RomStatus.Unknown || GlobalWin.Game.Status == RomStatus.NotInDatabase);
}
private void AddToGameDbBtn_Click(object sender, EventArgs e)
@@ -148,7 +148,7 @@ namespace BizHawk.Client.EmuHawk
{
var gameDbEntry = Emulator.AsGameDBEntryGenerator().GenerateGameDbEntry();
var userDb = Path.Combine(PathUtils.ExeDirectoryPath, "gamedb", "gamedb_user.txt");
- Global.Game.Status = gameDbEntry.Status = picker.PickedStatus;
+ GlobalWin.Game.Status = gameDbEntry.Status = picker.PickedStatus;
Database.SaveDatabaseEntry(userDb, gameDbEntry);
MainForm.UpdateDumpIcon();
HideShowGameDbButton();
diff --git a/src/BizHawk.Client.EmuHawk/MainForm.cs b/src/BizHawk.Client.EmuHawk/MainForm.cs
index 14d9bc3b3c..0262a21bfa 100644
--- a/src/BizHawk.Client.EmuHawk/MainForm.cs
+++ b/src/BizHawk.Client.EmuHawk/MainForm.cs
@@ -890,8 +890,8 @@ namespace BizHawk.Client.EmuHawk
private GameInfo Game
{
- get => Global.Game;
- set => Global.Game = value;
+ get => GlobalWin.Game;
+ set => GlobalWin.Game = value;
}
private Sound Sound => GlobalWin.Sound;
@@ -3679,10 +3679,10 @@ namespace BizHawk.Client.EmuHawk
//path = ioa_openrom.Path;
}
- var oldGame = Global.Game;
+ var oldGame = GlobalWin.Game;
var result = loader.LoadRom(path, nextComm, ioaRetro?.CorePath);
- Global.Game = result ? loader.Game : oldGame;
+ GlobalWin.Game = result ? loader.Game : oldGame;
// we need to replace the path in the OpenAdvanced with the canonical one the user chose.
// It can't be done until loader.LoadRom happens (for CanonicalFullPath)
@@ -3967,7 +3967,7 @@ namespace BizHawk.Client.EmuHawk
{
CloseGame(clearSram);
Emulator = new NullEmulator();
- Global.Game = GameInfo.NullInstance;
+ GlobalWin.Game = GameInfo.NullInstance;
Tools.Restart(Emulator);
RewireSound();
diff --git a/src/BizHawk.Client.EmuHawk/OpenAdvancedChooser.cs b/src/BizHawk.Client.EmuHawk/OpenAdvancedChooser.cs
index 09262ab1a8..e964179352 100644
--- a/src/BizHawk.Client.EmuHawk/OpenAdvancedChooser.cs
+++ b/src/BizHawk.Client.EmuHawk/OpenAdvancedChooser.cs
@@ -72,7 +72,7 @@ namespace BizHawk.Client.EmuHawk
try
{
var coreComm = _mainForm.CreateCoreComm();
- using var retro = new LibretroCore(coreComm, Global.Game, core);
+ using var retro = new LibretroCore(coreComm, GlobalWin.Game, core);
btnLibretroLaunchGame.Enabled = true;
if (retro.Description.SupportsNoGame)
btnLibretroLaunchNoGame.Enabled = true;
diff --git a/src/BizHawk.Client.EmuHawk/config/GB/BmpView.cs b/src/BizHawk.Client.EmuHawk/config/GB/BmpView.cs
index d9891350e3..aae2cf2413 100644
--- a/src/BizHawk.Client.EmuHawk/config/GB/BmpView.cs
+++ b/src/BizHawk.Client.EmuHawk/config/GB/BmpView.cs
@@ -103,7 +103,7 @@ namespace BizHawk.Client.EmuHawk
using var sfd = new SaveFileDialog
{
- FileName = $"{Global.Game.FilesystemSafeName()}-Palettes",
+ FileName = $"{GlobalWin.Game.FilesystemSafeName()}-Palettes",
InitialDirectory = path,
Filter = FilesystemFilterSet.Screenshots.ToString(),
RestoreDirectory = true
diff --git a/src/BizHawk.Client.EmuHawk/config/GB/ColorChooserForm.cs b/src/BizHawk.Client.EmuHawk/config/GB/ColorChooserForm.cs
index 86b8acf1f5..c9790cb725 100644
--- a/src/BizHawk.Client.EmuHawk/config/GB/ColorChooserForm.cs
+++ b/src/BizHawk.Client.EmuHawk/config/GB/ColorChooserForm.cs
@@ -345,7 +345,7 @@ namespace BizHawk.Client.EmuHawk
using var sfd = new SaveFileDialog
{
InitialDirectory = GlobalWin.Config.PathEntries.PalettesAbsolutePathFor("GB"),
- FileName = $"{Global.Game.Name}.pal",
+ FileName = $"{GlobalWin.Game.Name}.pal",
Filter = new FilesystemFilterSet(FilesystemFilter.Palettes).ToString(),
RestoreDirectory = true
};
diff --git a/src/BizHawk.Client.EmuHawk/config/PathConfig.cs b/src/BizHawk.Client.EmuHawk/config/PathConfig.cs
index 4672aa51aa..79302dbd0f 100644
--- a/src/BizHawk.Client.EmuHawk/config/PathConfig.cs
+++ b/src/BizHawk.Client.EmuHawk/config/PathConfig.cs
@@ -59,7 +59,7 @@ namespace BizHawk.Client.EmuHawk
private void SetDefaultFocusedTab()
{
- var tab = FindTabByName(Global.Game.System);
+ var tab = FindTabByName(GlobalWin.Game.System);
if (tab != null)
{
PathTabControl.SelectTab(tab);
diff --git a/src/BizHawk.Client.EmuHawk/movie/RecordMovie.cs b/src/BizHawk.Client.EmuHawk/movie/RecordMovie.cs
index c709e56824..bedb6d6044 100644
--- a/src/BizHawk.Client.EmuHawk/movie/RecordMovie.cs
+++ b/src/BizHawk.Client.EmuHawk/movie/RecordMovie.cs
@@ -133,7 +133,7 @@ namespace BizHawk.Client.EmuHawk
movieToRecord.PopulateWithDefaultHeaderValues(
_emulator,
- Global.Game,
+ GlobalWin.Game,
GlobalWin.FirmwareManager,
AuthorBox.Text ?? _config.DefaultAuthor);
movieToRecord.Save();
diff --git a/src/BizHawk.Client.EmuHawk/tools/CDL.cs b/src/BizHawk.Client.EmuHawk/tools/CDL.cs
index 0bd0297ace..6fca6f6c7c 100644
--- a/src/BizHawk.Client.EmuHawk/tools/CDL.cs
+++ b/src/BizHawk.Client.EmuHawk/tools/CDL.cs
@@ -481,7 +481,7 @@ namespace BizHawk.Client.EmuHawk
try
{
_autoloading = true;
- var autoResumeFile = $"{Global.Game.FilesystemSafeName()}.cdl";
+ var autoResumeFile = $"{GlobalWin.Game.FilesystemSafeName()}.cdl";
var autoResumeDir = Config.PathEntries.LogAbsolutePath();
var autoResumePath = Path.Combine(autoResumeDir, autoResumeFile);
if (File.Exists(autoResumePath))
diff --git a/src/BizHawk.Client.EmuHawk/tools/Cheats/Cheats.cs b/src/BizHawk.Client.EmuHawk/tools/Cheats/Cheats.cs
index 5e62b847f5..46b0f757e5 100644
--- a/src/BizHawk.Client.EmuHawk/tools/Cheats/Cheats.cs
+++ b/src/BizHawk.Client.EmuHawk/tools/Cheats/Cheats.cs
@@ -118,7 +118,7 @@ namespace BizHawk.Client.EmuHawk
{
var file = SaveFileDialog(
MainForm.CheatList.CurrentFileName,
- Config.PathEntries.CheatsAbsolutePath(Global.Game.System),
+ Config.PathEntries.CheatsAbsolutePath(GlobalWin.Game.System),
"Cheat Files",
"cht");
@@ -350,7 +350,7 @@ namespace BizHawk.Client.EmuHawk
{
var file = OpenFileDialog(
MainForm.CheatList.CurrentFileName,
- Config.PathEntries.CheatsAbsolutePath(Global.Game.System),
+ Config.PathEntries.CheatsAbsolutePath(GlobalWin.Game.System),
"Cheat Files",
"cht");
diff --git a/src/BizHawk.Client.EmuHawk/tools/ExternalToolManager.cs b/src/BizHawk.Client.EmuHawk/tools/ExternalToolManager.cs
index 22c528b106..3979146488 100644
--- a/src/BizHawk.Client.EmuHawk/tools/ExternalToolManager.cs
+++ b/src/BizHawk.Client.EmuHawk/tools/ExternalToolManager.cs
@@ -107,7 +107,7 @@ namespace BizHawk.Client.EmuHawk
: "This tool doesn't work with this system";
return item;
}
- if (applicabilityAttrs[0].NotApplicableTo(Global.Game.Hash, system))
+ if (applicabilityAttrs[0].NotApplicableTo(GlobalWin.Game.Hash, system))
{
item.ToolTipText = "This tool doesn't work with this game";
return item;
diff --git a/src/BizHawk.Client.EmuHawk/tools/HexEditor/HexEditor.cs b/src/BizHawk.Client.EmuHawk/tools/HexEditor/HexEditor.cs
index a8d7f0969f..6ca816ee0a 100644
--- a/src/BizHawk.Client.EmuHawk/tools/HexEditor/HexEditor.cs
+++ b/src/BizHawk.Client.EmuHawk/tools/HexEditor/HexEditor.cs
@@ -912,7 +912,7 @@ namespace BizHawk.Client.EmuHawk
, FileName =
_domain.Name == "File on Disk"
? RomName
- : Global.Game.FilesystemSafeName()
+ : GlobalWin.Game.FilesystemSafeName()
};
var result = sfd.ShowHawkDialog();
@@ -925,7 +925,7 @@ namespace BizHawk.Client.EmuHawk
{
FileName = _domain.Name == "File on Disk"
? $"{Path.GetFileNameWithoutExtension(RomName)}.txt"
- : Global.Game.FilesystemSafeName(),
+ : GlobalWin.Game.FilesystemSafeName(),
Filter = new FilesystemFilterSet(FilesystemFilter.TextFiles).ToString(),
InitialDirectory = RomDirectory,
RestoreDirectory = true
diff --git a/src/BizHawk.Client.EmuHawk/tools/Lua/LuaConsole.cs b/src/BizHawk.Client.EmuHawk/tools/Lua/LuaConsole.cs
index a6eee7a8b3..25a913d6ea 100644
--- a/src/BizHawk.Client.EmuHawk/tools/Lua/LuaConsole.cs
+++ b/src/BizHawk.Client.EmuHawk/tools/Lua/LuaConsole.cs
@@ -635,9 +635,9 @@ namespace BizHawk.Client.EmuHawk
sfd.FileName = Path.GetFileNameWithoutExtension(LuaImp.ScriptList.Filename);
sfd.InitialDirectory = Path.GetDirectoryName(LuaImp.ScriptList.Filename);
}
- else if (Global.Game != null)
+ else if (GlobalWin.Game != null)
{
- sfd.FileName = Global.Game.FilesystemSafeName();
+ sfd.FileName = GlobalWin.Game.FilesystemSafeName();
sfd.InitialDirectory = Config.PathEntries.LuaAbsolutePath();
}
else
@@ -834,7 +834,7 @@ namespace BizHawk.Client.EmuHawk
DefaultExt = ".lua",
FileName = !string.IsNullOrWhiteSpace(LuaImp.ScriptList.Filename)
? Path.GetFileNameWithoutExtension(LuaImp.ScriptList.Filename)
- : Path.GetFileNameWithoutExtension(Global.Game.Name),
+ : Path.GetFileNameWithoutExtension(GlobalWin.Game.Name),
OverwritePrompt = true,
Filter = new FilesystemFilterSet(FilesystemFilter.LuaScripts).ToString()
};
diff --git a/src/BizHawk.Client.EmuHawk/tools/Macros/MacroInput.cs b/src/BizHawk.Client.EmuHawk/tools/Macros/MacroInput.cs
index 70b4d982be..5b9e26d240 100644
--- a/src/BizHawk.Client.EmuHawk/tools/Macros/MacroInput.cs
+++ b/src/BizHawk.Client.EmuHawk/tools/Macros/MacroInput.cs
@@ -260,7 +260,7 @@ namespace BizHawk.Client.EmuHawk
{
return Config.PathEntries.AbsolutePathFor(Path.Combine(
Config.PathEntries["Global", "Macros"].Path,
- Global.Game.FilesystemSafeName()), null);
+ GlobalWin.Game.FilesystemSafeName()), null);
}
public bool SaveMacroAs(MovieZone macro)
diff --git a/src/BizHawk.Client.EmuHawk/tools/MultiDiskBundler/MultiDiskBundler.cs b/src/BizHawk.Client.EmuHawk/tools/MultiDiskBundler/MultiDiskBundler.cs
index 7f714665c2..c2d6df12e6 100644
--- a/src/BizHawk.Client.EmuHawk/tools/MultiDiskBundler/MultiDiskBundler.cs
+++ b/src/BizHawk.Client.EmuHawk/tools/MultiDiskBundler/MultiDiskBundler.cs
@@ -35,7 +35,7 @@ namespace BizHawk.Client.EmuHawk
AddButton_Click(null, null);
AddButton_Click(null, null);
- if (!Global.Game.IsNullInstance() && !MainForm.CurrentlyOpenRom.EndsWith(".xml"))
+ if (!GlobalWin.Game.IsNullInstance() && !MainForm.CurrentlyOpenRom.EndsWith(".xml"))
{
if (MainForm.CurrentlyOpenRom.Contains("|"))
{
@@ -215,12 +215,12 @@ namespace BizHawk.Client.EmuHawk
string filename = "";
string initialDirectory = Config.PathEntries.MultiDiskAbsolutePath();
- if (!Global.Game.IsNullInstance())
+ if (!GlobalWin.Game.IsNullInstance())
{
filename = NameBox.Text;
if (string.IsNullOrWhiteSpace(filename))
{
- filename = Path.ChangeExtension(Global.Game.FilesystemSafeName(), ".xml");
+ filename = Path.ChangeExtension(GlobalWin.Game.FilesystemSafeName(), ".xml");
}
initialDirectory = Path.GetDirectoryName(filename);
diff --git a/src/BizHawk.Client.EmuHawk/tools/NES/NESNameTableViewer.cs b/src/BizHawk.Client.EmuHawk/tools/NES/NESNameTableViewer.cs
index 063e29be48..0facf93e97 100644
--- a/src/BizHawk.Client.EmuHawk/tools/NES/NESNameTableViewer.cs
+++ b/src/BizHawk.Client.EmuHawk/tools/NES/NESNameTableViewer.cs
@@ -184,7 +184,7 @@ namespace BizHawk.Client.EmuHawk
{
using var sfd = new SaveFileDialog
{
- FileName = $"{Global.Game.FilesystemSafeName()}-Nametables",
+ FileName = $"{GlobalWin.Game.FilesystemSafeName()}-Nametables",
InitialDirectory = GlobalWin.Config.PathEntries.ScreenshotAbsolutePathFor("NES"),
Filter = FilesystemFilterSet.Screenshots.ToString(),
RestoreDirectory = true
diff --git a/src/BizHawk.Client.EmuHawk/tools/NES/NESPPU.cs b/src/BizHawk.Client.EmuHawk/tools/NES/NESPPU.cs
index d78ef8cc6e..cbb25bf9ae 100644
--- a/src/BizHawk.Client.EmuHawk/tools/NES/NESPPU.cs
+++ b/src/BizHawk.Client.EmuHawk/tools/NES/NESPPU.cs
@@ -314,7 +314,7 @@ namespace BizHawk.Client.EmuHawk
{
var sfd = new SaveFileDialog
{
- FileName = $"{Global.Game.FilesystemSafeName()}-{suffix}",
+ FileName = $"{GlobalWin.Game.FilesystemSafeName()}-{suffix}",
InitialDirectory = Config.PathEntries.ScreenshotAbsolutePathFor("NES"),
Filter = FilesystemFilterSet.Screenshots.ToString(),
RestoreDirectory = true
diff --git a/src/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.IToolForm.cs b/src/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.IToolForm.cs
index 445597192d..1ae82dc589 100644
--- a/src/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.IToolForm.cs
+++ b/src/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.IToolForm.cs
@@ -77,7 +77,7 @@ namespace BizHawk.Client.EmuHawk
if (CurrentTasMovie != null)
{
- if (Global.Game.Hash != CurrentTasMovie.Hash)
+ if (GlobalWin.Game.Hash != CurrentTasMovie.Hash)
{
TastudioStopMovie();
TasView.AllColumns.Clear();
diff --git a/src/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.cs b/src/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.cs
index 92af189c14..9cc755a6f4 100644
--- a/src/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.cs
+++ b/src/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.cs
@@ -686,7 +686,7 @@ namespace BizHawk.Client.EmuHawk
tasMovie.PopulateWithDefaultHeaderValues(
Emulator,
- Global.Game,
+ GlobalWin.Game,
GlobalWin.FirmwareManager,
Config.DefaultAuthor);
@@ -813,7 +813,7 @@ namespace BizHawk.Client.EmuHawk
{
return Path.Combine(
Config.PathEntries.MovieAbsolutePath(),
- $"{Global.Game.FilesystemSafeName()}.{MovieService.TasMovieExtension}");
+ $"{GlobalWin.Game.FilesystemSafeName()}.{MovieService.TasMovieExtension}");
}
private void SaveTas()
diff --git a/src/BizHawk.Client.EmuHawk/tools/ToolFormBase.cs b/src/BizHawk.Client.EmuHawk/tools/ToolFormBase.cs
index 389f729739..e20af16676 100644
--- a/src/BizHawk.Client.EmuHawk/tools/ToolFormBase.cs
+++ b/src/BizHawk.Client.EmuHawk/tools/ToolFormBase.cs
@@ -57,7 +57,7 @@ namespace BizHawk.Client.EmuHawk
{
FileName = !string.IsNullOrWhiteSpace(currentFile)
? Path.GetFileName(currentFile)
- : $"{Global.Game.FilesystemSafeName()}.{fileExt}",
+ : $"{GlobalWin.Game.FilesystemSafeName()}.{fileExt}",
InitialDirectory = path,
Filter = new FilesystemFilterSet(new FilesystemFilter(fileType, new[] { fileExt })).ToString(),
RestoreDirectory = true
@@ -83,7 +83,7 @@ namespace BizHawk.Client.EmuHawk
{
FileName = !string.IsNullOrWhiteSpace(currentFile)
? Path.GetFileName(currentFile)
- : $"{Global.Game.FilesystemSafeName()}.{fileExt}",
+ : $"{GlobalWin.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 0c40d62db3..143c35876c 100644
--- a/src/BizHawk.Client.EmuHawk/tools/ToolManager.cs
+++ b/src/BizHawk.Client.EmuHawk/tools/ToolManager.cs
@@ -774,7 +774,7 @@ namespace BizHawk.Client.EmuHawk
public string GenerateDefaultCheatFilename()
{
- var path = _config.PathEntries.CheatsAbsolutePath(Global.Game.System);
+ var path = _config.PathEntries.CheatsAbsolutePath(GlobalWin.Game.System);
var f = new FileInfo(path);
if (f.Directory != null && f.Directory.Exists == false)
@@ -782,7 +782,7 @@ namespace BizHawk.Client.EmuHawk
f.Directory.Create();
}
- return Path.Combine(path, $"{Global.Game.FilesystemSafeName()}.cht");
+ return Path.Combine(path, $"{GlobalWin.Game.FilesystemSafeName()}.cht");
}
public void UpdateCheatRelatedTools(object sender, CheatCollection.CheatListEventArgs e)
diff --git a/src/BizHawk.Client.EmuHawk/tools/TraceLogger.cs b/src/BizHawk.Client.EmuHawk/tools/TraceLogger.cs
index 98ea08d88e..a45ff99792 100644
--- a/src/BizHawk.Client.EmuHawk/tools/TraceLogger.cs
+++ b/src/BizHawk.Client.EmuHawk/tools/TraceLogger.cs
@@ -274,12 +274,12 @@ namespace BizHawk.Client.EmuHawk
using var sfd = new SaveFileDialog();
if (LogFile == null)
{
- sfd.FileName = Global.Game.FilesystemSafeName() + _extension;
+ sfd.FileName = GlobalWin.Game.FilesystemSafeName() + _extension;
sfd.InitialDirectory = Config.PathEntries.LogAbsolutePath();
}
else if (!string.IsNullOrWhiteSpace(LogFile.FullName))
{
- sfd.FileName = Global.Game.FilesystemSafeName();
+ sfd.FileName = GlobalWin.Game.FilesystemSafeName();
sfd.InitialDirectory = Path.GetDirectoryName(LogFile.FullName);
}
else
@@ -439,7 +439,7 @@ namespace BizHawk.Client.EmuHawk
{
FileBox.Visible = true;
BrowseBox.Visible = true;
- var name = Global.Game.FilesystemSafeName();
+ var name = GlobalWin.Game.FilesystemSafeName();
var filename = Path.Combine(Config.PathEntries.LogAbsolutePath(), name) + _extension;
LogFile = new FileInfo(filename);
if (LogFile.Directory != null && !LogFile.Directory.Exists)