diff --git a/stepmania/src/Crash.cpp b/stepmania/src/Crash.cpp index 571b2df6dd..608586a81b 100644 --- a/stepmania/src/Crash.cpp +++ b/stepmania/src/Crash.cpp @@ -33,6 +33,7 @@ // GotoURL pulls in MFC stuff that we really shouldn't have here. // #include "RageUtil.h" // for GotoURL HINSTANCE GotoURL(const char *url); +static void DoSave(const EXCEPTION_POINTERS *pExc); /* in StepMania.cpp */ void CleanupForRestart(); @@ -270,8 +271,8 @@ static void DoEraseEmergencyDump() DeleteFile(szEmergencyDumpName); } -//#include "bass/bass.h" #include "RageSound.h" +extern HWND g_hWndMain; long __stdcall CrashHandler(EXCEPTION_POINTERS *pExc) { ///////////////////////// // @@ -365,6 +366,14 @@ long __stdcall CrashHandler(EXCEPTION_POINTERS *pExc) { cdw.parse(); + /* In case something goes amiss before the user can view the crash + * dump, save it now. */ + DoSave(pExc); + + /* If we're fullscreen, the fullscreen d3d window will obscure + * the crash dialog. */ + ShowWindow( g_hWndMain, SW_HIDE ); + int ret = DialogBoxParam(g_hInstance, MAKEINTRESOURCE(IDD_DISASM_CRASH), NULL, CrashDlgProc, (LPARAM)pExc); /* Returns TRUE if we want to pop up the standard crash box; * FALSE if we should just die. */ @@ -1442,8 +1451,6 @@ BOOL APIENTRY CrashDlgProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam) { "StepMania warning", MB_OK|MB_ICONEXCLAMATION)) return TRUE; - DoSave(s_pExc); - ViewWithNotepad("crashinfo.txt"); return TRUE; case IDC_BUTTON_RESTART: