Fix up Start Emulation causing Project 64 to crash out, g_BaseSystem

This commit is contained in:
Nicholas 2015-01-26 14:52:55 +11:00
parent b76a151dd3
commit ba6c04c6f0
1 changed files with 5 additions and 0 deletions

View File

@ -77,6 +77,11 @@ bool CMainMenu::ProcessMessage(WND_HANDLE hWnd, DWORD /*FromAccelerator*/, DWORD
break;
case ID_FILE_STARTEMULATION:
_Gui->SaveWindowLoc();
//Before we go and create the new system, ensure the previous one has been closed
CN64System::CloseSystem();
//Ok now g_BaseSystem should definitely be clean for initialization
g_BaseSystem = new CN64System(g_Plugins, false);
//Now we have created again, we can start up emulation
g_BaseSystem->StartEmulation(true);
break;
case ID_FILE_ENDEMULATION: