diff --git a/src/BizHawk.Client.EmuHawk/GlobalWin.cs b/src/BizHawk.Client.EmuHawk/GlobalWin.cs index 5f7172b1cd..b069b587a7 100644 --- a/src/BizHawk.Client.EmuHawk/GlobalWin.cs +++ b/src/BizHawk.Client.EmuHawk/GlobalWin.cs @@ -14,8 +14,6 @@ namespace BizHawk.Client.EmuHawk public static Config Config { get; set; } - public static GameInfo Game => _mainForm.Game; - public static IMovieSession MovieSession => _mainForm.MovieSession; public static InputManager InputManager { get; } = new InputManager(); diff --git a/src/BizHawk.Client.EmuHawk/IEmuHawkMainFormToTools.cs b/src/BizHawk.Client.EmuHawk/IEmuHawkMainFormToTools.cs index ca311cd584..3ec737348c 100644 --- a/src/BizHawk.Client.EmuHawk/IEmuHawkMainFormToTools.cs +++ b/src/BizHawk.Client.EmuHawk/IEmuHawkMainFormToTools.cs @@ -3,6 +3,7 @@ using System.Windows.Forms; using BizHawk.Bizware.BizwareGL; using BizHawk.Client.Common; +using BizHawk.Emulation.Common; namespace BizHawk.Client.EmuHawk { @@ -109,7 +110,7 @@ namespace BizHawk.Client.EmuHawk void Unthrottle(); /// only referenced from - void UpdateDumpIcon(); + void UpdateDumpInfo(RomStatus? newStatus = null); /// only referenced from void UpdateStatusSlots(); diff --git a/src/BizHawk.Client.EmuHawk/LogWindow.cs b/src/BizHawk.Client.EmuHawk/LogWindow.cs index 6c5374aafc..fa800cadad 100644 --- a/src/BizHawk.Client.EmuHawk/LogWindow.cs +++ b/src/BizHawk.Client.EmuHawk/LogWindow.cs @@ -154,10 +154,9 @@ namespace BizHawk.Client.EmuHawk if (result.IsOk()) { var gameDbEntry = Emulator.AsGameDBEntryGenerator().GenerateGameDbEntry(); - var userDb = Path.Combine(PathUtils.ExeDirectoryPath, "gamedb", "gamedb_user.txt"); - GlobalWin.Game.Status = gameDbEntry.Status = picker.PickedStatus; - Database.SaveDatabaseEntry(userDb, gameDbEntry); - MainForm.UpdateDumpIcon(); + gameDbEntry.Status = picker.PickedStatus; + Database.SaveDatabaseEntry(Path.Combine(PathUtils.ExeDirectoryPath, "gamedb", "gamedb_user.txt"), gameDbEntry); + MainForm.UpdateDumpInfo(gameDbEntry.Status); HideShowGameDbButton(); } } diff --git a/src/BizHawk.Client.EmuHawk/MainForm.cs b/src/BizHawk.Client.EmuHawk/MainForm.cs index 4d726e1972..83c43ef75e 100644 --- a/src/BizHawk.Client.EmuHawk/MainForm.cs +++ b/src/BizHawk.Client.EmuHawk/MainForm.cs @@ -1651,7 +1651,7 @@ namespace BizHawk.Client.EmuHawk HandleToggleLightAndLink(); } - public void UpdateDumpIcon() + public void UpdateDumpInfo(RomStatus? newStatus = null) { DumpStatusButton.Image = Properties.Resources.Blank; DumpStatusButton.ToolTipText = ""; @@ -1661,7 +1661,9 @@ namespace BizHawk.Client.EmuHawk return; } - var status = Game.Status; + var status = newStatus == null + ? Game.Status + : (Game.Status = newStatus.Value); if (status == RomStatus.BadDump) { DumpStatusButton.Image = Properties.Resources.ExclamationRed; @@ -3830,7 +3832,7 @@ namespace BizHawk.Client.EmuHawk _stateSlots.ClearRedoList(); UpdateStatusSlots(); UpdateCoreStatusBarButton(); - UpdateDumpIcon(); + UpdateDumpInfo(); SetMainformMovieInfo(); }