From c162b2774da54147e0f64945a2ebfc4b1fc24fb5 Mon Sep 17 00:00:00 2001 From: adelikat Date: Sun, 22 Dec 2019 09:44:23 -0600 Subject: [PATCH] Mainform - a bit of cleanup --- BizHawk.Client.EmuHawk/MainForm.cs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/BizHawk.Client.EmuHawk/MainForm.cs b/BizHawk.Client.EmuHawk/MainForm.cs index e2d539f1a0..7418af57a7 100644 --- a/BizHawk.Client.EmuHawk/MainForm.cs +++ b/BizHawk.Client.EmuHawk/MainForm.cs @@ -3835,7 +3835,7 @@ namespace BizHawk.Client.EmuHawk if (Config.LoadCheatFileByGame) { - CheatList.SetDefaultFileName(GlobalWin.Tools.GenerateDefaultCheatFilename()); + CheatList.SetDefaultFileName(Tools.GenerateDefaultCheatFilename()); if (CheatList.AttemptToLoadCheatFile()) { AddOnScreenMessage("Cheats file loaded"); @@ -3876,19 +3876,19 @@ namespace BizHawk.Client.EmuHawk ClientApi.OnRomLoaded(Emulator); return true; } - else if (!(Emulator is NullEmulator)) - { - // The ROM has been loaded by a recursive invocation of the LoadROM method. - ClientApi.OnRomLoaded(Emulator); - return true; - } - else + else if (Emulator.IsNull()) { // This shows up if there's a problem ClientApi.UpdateEmulatorAndVP(Emulator); OnRomChanged(); return false; } + else + { + // The ROM has been loaded by a recursive invocation of the LoadROM method. + ClientApi.OnRomLoaded(Emulator); + return true; + } } finally {