From 307b50179a7bd72d53540ab0c7a331659f6f497b Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Tue, 27 Aug 2002 23:16:52 +0000 Subject: [PATCH] s/VirtualDub/StepMania/ (in display, anyway) --- stepmania/src/Crash.cpp | 43 ++++++++++++++++++++++++++----------- stepmania/src/Disasm.cpp | 4 ++-- stepmania/src/StepMania.RC | 11 +++++----- stepmania/src/ia32.vdi | Bin 9002 -> 9002 bytes 4 files changed, 39 insertions(+), 19 deletions(-) diff --git a/stepmania/src/Crash.cpp b/stepmania/src/Crash.cpp index 1f6bf0264b..5ec210bb34 100644 --- a/stepmania/src/Crash.cpp +++ b/stepmania/src/Crash.cpp @@ -297,7 +297,7 @@ long __stdcall CrashHandler(EXCEPTION_POINTERS *pExc) { // Attempt to read debug file. - bool bSuccess; + bool bSuccess=0; if (cdw.vdc.pExtraData) { bSuccess = VDDebugInfoInitFromMemory(&g_debugInfo, cdw.vdc.pExtraData); @@ -954,13 +954,13 @@ bool VDDebugInfoInitFromMemory(VDDebugInfoContext *pctx, const void *_src) { // Check type string - if (!memcmp((char *)src + 6, "] VirtualDub disasm", 19)) + if (!memcmp((char *)src + 6, "] StepMania disasm", 18)) src += *(long *)(src + 64) + 72; if (src[0] != '[' || src[3] != '|') return false; - if (memcmp((char *)src + 6, "] VirtualDub symbolic debug information", 39)) + if (memcmp((char *)src + 6, "] StepMania symbolic debug information", 38)) return false; // Check version number @@ -1021,9 +1021,6 @@ bool VDDebugInfoInitFromFile(VDDebugInfoContext *pctx, const char *pszFilename) CloseHandle(h); return true; } - - VirtualFree(pctx->pRawBlock, 0, MEM_RELEASE); - } while(false); VDDebugInfoDeinit(pctx); @@ -1120,12 +1117,12 @@ static bool ReportCrashCallStack(HWND hwnd, HANDLE hFile, const EXCEPTION_POINTE char buf[512]; if (!g_debugInfo.pRVAHeap) { - Report(hwnd, hFile, "Could not open debug resource file (VirtualDub.vdi)."); + Report(hwnd, hFile, "Could not open debug resource file (StepMania.vdi)."); return false; } if (g_debugInfo.nBuildNumber != int(version_num)) { - Report(hwnd, hFile, "Incorrect VirtualDub.vdi file (build %d, expected %d) for this version of VirtualDub -- call stack unavailable.", g_debugInfo.nBuildNumber, int(version_num)); + Report(hwnd, hFile, "Incorrect StepMania.vdi file (build %d, expected %d) for this version of StepMania -- call stack unavailable.", g_debugInfo.nBuildNumber, int(version_num)); return false; } @@ -1244,7 +1241,7 @@ void DoSave(const EXCEPTION_POINTERS *pExc) { return; Report(NULL, hFile, - "VirtualDub crash report -- build %d\r\n" + "StepMania crash report -- build %d\r\n" "--------------------------------------\r\n" "\r\n" "Disassembly:", version_num); @@ -1323,19 +1320,41 @@ BOOL APIENTRY CrashDlgProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam) { case WM_COMMAND: switch(LOWORD(wParam)) { - case IDCANCEL: case IDOK: + case IDC_BUTTON_CLOSE: EndDialog(hDlg, FALSE); return TRUE; + case IDOK: + EndDialog(hDlg, TRUE); + return TRUE; case IDC_CRASH_SAVE: if (!s_bHaveCallstack) if (IDOK != MessageBox(hDlg, - "VirtualDub cannot load its crash resource file, and thus the crash dump will be " + "StepMania cannot load its crash resource file, and thus the crash dump will be " "missing the most important part, the call stack. Crash dumps are much less useful " "without the call stack.", - "VirtualDub warning", MB_OK|MB_ICONEXCLAMATION)) + "StepMania warning", MB_OK|MB_ICONEXCLAMATION)) return TRUE; DoSave(s_pExc); + + { + PROCESS_INFORMATION pi; + STARTUPINFO si; + ZeroMemory( &si, sizeof(si) ); + + CreateProcess( + NULL, // pointer to name of executable module + "notepad.exe crashinfo.txt", // pointer to command line string + NULL, // process security attributes + NULL, // thread security attributes + false, // handle inheritance flag + 0, // creation flags + NULL, // pointer to new environment block + NULL, // pointer to current directory name + &si, // pointer to STARTUPINFO + &pi // pointer to PROCESS_INFORMATION + ); + } return TRUE; case IDC_BUTTON_RESTART: { diff --git a/stepmania/src/Disasm.cpp b/stepmania/src/Disasm.cpp index e8e6c137ce..329bac8947 100644 --- a/stepmania/src/Disasm.cpp +++ b/stepmania/src/Disasm.cpp @@ -499,7 +499,7 @@ bool VDDisasmInit(VDDisassemblyContext *pvdc, const char *pszFilename) { if (src[0] != '[' || src[3] != '|') return false; - if (memcmp((char *)src + 6, "] VirtualDub disasm module", 26)) + if (memcmp((char *)src + 6, "] StepMania disasm module", 25)) return false; // Check version number @@ -591,7 +591,7 @@ CodeDisassemblyWindow::CodeDisassemblyWindow(void *_code, long _length, void *_r ); if (!hFontMono) hFontMono = (HFONT)GetStockObject(ANSI_FIXED_FONT); - + num_ents = 0; } CodeDisassemblyWindow::~CodeDisassemblyWindow() { diff --git a/stepmania/src/StepMania.RC b/stepmania/src/StepMania.RC index ef5bb58364..5d59f40dac 100644 --- a/stepmania/src/StepMania.RC +++ b/stepmania/src/StepMania.RC @@ -183,14 +183,15 @@ BEGIN LTEXT "CPU registers",IDC_STATIC,287,46,44,8 LTEXT "StepMania has crashed due to a program error. Please hit Save to dump diagnostic information to a file called 'crashinfo.txt' in the StepMania program directory, and then OK to bring up the normal crash box.", IDC_STATIC,7,238,319,25 - PUSHBUTTON "Save",IDC_CRASH_SAVE,77,270,50,15 + PUSHBUTTON "Save",IDC_CRASH_SAVE,76,270,70,15 LISTBOX IDC_CALL_STACK,7,178,279,38,LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP LTEXT "Estimated call stack",IDC_STATIC,7,167,64,8 CONTROL 121,IDC_STATIC,"Static",SS_BITMAP,1,2,396,36 - PUSHBUTTON "View Log",IDC_BUTTON_VIEW_LOG,1,270,74,15 - PUSHBUTTON "Restart StepMania",IDC_BUTTON_RESTART,129,270,80,15 - PUSHBUTTON "Report the Error",IDC_BUTTON_REPORT,211,270,76,15 + PUSHBUTTON "View Log",IDC_BUTTON_VIEW_LOG,1,270,70,15 + PUSHBUTTON "Restart",IDC_BUTTON_RESTART,348,254,50,15 + PUSHBUTTON "Report the Error",IDC_BUTTON_REPORT,207,270,76,15 + PUSHBUTTON "Close",IDC_BUTTON_CLOSE,348,238,50,15 END @@ -223,7 +224,7 @@ BEGIN LEFTMARGIN, 1 RIGHTMARGIN, 398 VERTGUIDE, 286 - BOTTOMMARGIN, 274 + BOTTOMMARGIN, 285 END END #endif // APSTUDIO_INVOKED diff --git a/stepmania/src/ia32.vdi b/stepmania/src/ia32.vdi index 3d95288c68ebe194704566f7418999e0f72b26e9..028c69e27694ab72cbef3cdb4d807a465966f4a3 100644 GIT binary patch delta 29 kcmZ4Gw#rQ~+Q6{Jz%W)JxFof}H!&|WaiWmkM*G)F0F}WCSO5S3 delta 30 lcmZ4Gw#rQ?+Q6{Jz%W)JEVHPjG%?4eG-;xs-bRO4N&uoF3fKSu