s/VirtualDub/StepMania/ (in display, anyway)

This commit is contained in:
Glenn Maynard
2002-08-27 23:16:52 +00:00
parent 0918dd3c9a
commit 307b50179a
4 changed files with 39 additions and 19 deletions
+31 -12
View File
@@ -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:
{
+2 -2
View File
@@ -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() {
+6 -5
View File
@@ -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
Binary file not shown.