win32: fix a crash which happened randomly when the app exited
This commit is contained in:
parent
44e6332c7b
commit
e51385c0bf
|
@ -1514,6 +1514,8 @@ int WINAPI WinMain (HINSTANCE hThisInstance,
|
|||
|
||||
MainWindow->Show(SW_NORMAL);
|
||||
run();
|
||||
SaveRecentRoms();
|
||||
NDS_DeInit();
|
||||
DRV_AviEnd();
|
||||
|
||||
//------SHUTDOWN
|
||||
|
@ -2119,8 +2121,6 @@ LRESULT CALLBACK WindowProcedure (HWND hwnd, UINT message, WPARAM wParam, LPARAM
|
|||
//Save frame counter status
|
||||
WritePrivateProfileInt("Display", "FrameCounter", frameCounterDisplay, IniName);
|
||||
WritePrivateProfileInt("Display", "ScreenGap", ScreenGap, IniName);
|
||||
SaveRecentRoms();
|
||||
NDS_DeInit();
|
||||
ExitRunLoop();
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue