win32: fix a crash which happened randomly when the app exited

This commit is contained in:
zeromus 2009-03-09 05:07:30 +00:00
parent 44e6332c7b
commit e51385c0bf
1 changed files with 2 additions and 2 deletions

View File

@ -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;
}