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."
This commit is contained in:
Vincent Cunningham 2021-02-01 23:42:54 -05:00
parent 89d56ff4fa
commit 3482a1a1cf
No known key found for this signature in database
GPG Key ID: 2F189694BB5A9932
1 changed files with 9 additions and 0 deletions

View File

@ -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__);