From 3482a1a1cfbc7bedc87d6ca52756a2c1f5d2b856 Mon Sep 17 00:00:00 2001 From: Vincent Cunningham Date: Mon, 1 Feb 2021 23:42:54 -0500 Subject: [PATCH] Call RunLoadedImage when manually starting emulation RunLoadedImage is skipped in the Run*Image methods in CN64System if AutoStart is disabled. If the check for if there is a current g_BaseSystem fails, these changes run RunLoadedImage to create one and StartEmulation. I'm not sure the extra NULL guard is necessary, but I don't want to skip the first g_BaseSystem check altogether. I added it as a "just in case." --- Source/Project64/UserInterface/MainMenu.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Source/Project64/UserInterface/MainMenu.cpp b/Source/Project64/UserInterface/MainMenu.cpp index 0cee54773..dfaae0a83 100644 --- a/Source/Project64/UserInterface/MainMenu.cpp +++ b/Source/Project64/UserInterface/MainMenu.cpp @@ -304,6 +304,15 @@ bool CMainMenu::ProcessMessage(HWND hWnd, DWORD /*FromAccelerator*/, DWORD MenuI { g_BaseSystem->StartEmulation(true); } + else if (g_Settings->LoadBool(Setting_AutoStart) == 0) + { + WriteTrace(TraceN64System, TraceDebug, "Manually starting rom"); + CN64System::RunLoadedImage(); + if (g_BaseSystem == NULL) + { + g_Notify->BreakPoint(__FILE__, __LINE__); + } + } else { g_Notify->BreakPoint(__FILE__, __LINE__);