From e51385c0bf32c8b340d2f7e2b5b7cdc5c2372dfd Mon Sep 17 00:00:00 2001 From: zeromus Date: Mon, 9 Mar 2009 05:07:30 +0000 Subject: [PATCH] win32: fix a crash which happened randomly when the app exited --- desmume/src/windows/main.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/desmume/src/windows/main.cpp b/desmume/src/windows/main.cpp index c1e7f1a30..8bf12e5bb 100644 --- a/desmume/src/windows/main.cpp +++ b/desmume/src/windows/main.cpp @@ -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; }