Only skip StartEmulation in RunLoadedImage when AutoStart disabled

This commit is contained in:
Vincent Cunningham 2021-02-02 10:27:23 -05:00
parent 3482a1a1cf
commit 678c5819e8
No known key found for this signature in database
GPG Key ID: 2F189694BB5A9932
2 changed files with 12 additions and 25 deletions

View File

@ -515,11 +515,7 @@ bool CN64System::RunFileImage(const char * FileLoc)
g_Settings->SaveString(File_DiskIPLTOOLPath, FileLoc); g_Settings->SaveString(File_DiskIPLTOOLPath, FileLoc);
} }
if (g_Settings->LoadBool(Setting_AutoStart) != 0) RunLoadedImage();
{
WriteTrace(TraceN64System, TraceDebug, "Automattically starting rom");
RunLoadedImage();
}
return true; return true;
} }
@ -537,11 +533,7 @@ bool CN64System::RunDiskImage(const char * FileLoc)
} }
g_Settings->SaveBool(Setting_EnableDisk, true); g_Settings->SaveBool(Setting_EnableDisk, true);
if (g_Settings->LoadBool(Setting_AutoStart) != 0) RunLoadedImage();
{
WriteTrace(TraceN64System, TraceDebug, "Automattically starting rom");
RunLoadedImage();
}
return true; return true;
} }
@ -563,11 +555,7 @@ bool CN64System::RunDiskComboImage(const char * FileLoc, const char * FileLocDis
} }
g_Settings->SaveBool(Setting_EnableDisk, true); g_Settings->SaveBool(Setting_EnableDisk, true);
if (g_Settings->LoadBool(Setting_AutoStart) != 0) RunLoadedImage();
{
WriteTrace(TraceN64System, TraceDebug, "Automattically starting rom");
RunLoadedImage();
}
return true; return true;
} }
@ -577,7 +565,11 @@ void CN64System::RunLoadedImage(void)
g_BaseSystem = new CN64System(g_Plugins, (uint32_t)time(NULL), false, false); g_BaseSystem = new CN64System(g_Plugins, (uint32_t)time(NULL), false, false);
if (g_BaseSystem) if (g_BaseSystem)
{ {
g_BaseSystem->StartEmulation(true); if (g_Settings->LoadBool(Setting_AutoStart) != 0)
{
WriteTrace(TraceN64System, TraceDebug, "Automattically starting rom");
g_BaseSystem->StartEmulation(true);
}
} }
else else
{ {

View File

@ -302,17 +302,12 @@ bool CMainMenu::ProcessMessage(HWND hWnd, DWORD /*FromAccelerator*/, DWORD MenuI
//Now we have created again, we can start up emulation //Now we have created again, we can start up emulation
if (g_BaseSystem) if (g_BaseSystem)
{ {
if (g_Settings->LoadBool(Setting_AutoStart) == 0)
{
WriteTrace(TraceN64System, TraceDebug, "Manually starting rom");
}
g_BaseSystem->StartEmulation(true); 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 else
{ {
g_Notify->BreakPoint(__FILE__, __LINE__); g_Notify->BreakPoint(__FILE__, __LINE__);