2003-02-16 04:02:21 +00:00
|
|
|
#include "global.h"
|
2003-01-24 23:09:31 +00:00
|
|
|
#include "ArchHooks_Win32.h"
|
|
|
|
|
|
|
|
|
|
#include "archutils/win32/tls.h"
|
|
|
|
|
#include "archutils/win32/crash.h"
|
2003-01-24 23:57:02 +00:00
|
|
|
#include "archutils/win32/DebugInfoHunt.h"
|
2003-01-24 23:09:31 +00:00
|
|
|
|
|
|
|
|
ArchHooks_Win32::ArchHooks_Win32()
|
|
|
|
|
{
|
|
|
|
|
SetUnhandledExceptionFilter(CrashHandler);
|
|
|
|
|
InitThreadData("Main thread");
|
|
|
|
|
VDCHECKPOINT;
|
|
|
|
|
}
|
|
|
|
|
|
2003-01-24 23:24:14 +00:00
|
|
|
void ArchHooks_Win32::Log(CString str, bool important)
|
|
|
|
|
{
|
|
|
|
|
/* It's OK to send to both of these; it'll let us know when important
|
|
|
|
|
* events occurred in crash dumps if they're recent. */
|
|
|
|
|
if(important)
|
|
|
|
|
StaticLog(str);
|
|
|
|
|
|
|
|
|
|
CrashLog(str);
|
|
|
|
|
}
|
|
|
|
|
|
2003-04-22 05:21:08 +00:00
|
|
|
void ArchHooks_Win32::AdditionalLog(CString str)
|
|
|
|
|
{
|
|
|
|
|
AdditionalLog(str);
|
|
|
|
|
}
|
|
|
|
|
|
2003-02-17 03:08:53 +00:00
|
|
|
void ArchHooks_Win32::DumpDebugInfo()
|
2003-01-24 23:57:02 +00:00
|
|
|
{
|
|
|
|
|
/* This is a good time to do the debug search: before we actually
|
|
|
|
|
* start OpenGL (in case something goes wrong). */
|
|
|
|
|
SearchForDebugInfo();
|
|
|
|
|
}
|
|
|
|
|
|
2003-07-04 22:45:53 +00:00
|
|
|
void ArchHooks_Win32::MessageBoxOK( CString sMessage )
|
|
|
|
|
{
|
|
|
|
|
MessageBox(NULL, sMessage, "StepMania", MB_OK );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
ArchHooks::MessageBoxResult ArchHooks_Win32::MessageBoxAbortRetryIgnore( CString sMessage )
|
|
|
|
|
{
|
|
|
|
|
switch( MessageBox(NULL, sMessage, "StepMania", MB_ABORTRETRYIGNORE ) )
|
|
|
|
|
{
|
|
|
|
|
case IDABORT: return abort;
|
|
|
|
|
case IDRETRY: return retry;
|
|
|
|
|
default: ASSERT(0);
|
|
|
|
|
case IDIGNORE: return ignore;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2003-01-24 23:09:31 +00:00
|
|
|
/*
|
|
|
|
|
* Copyright (c) 2002-2003 by the person(s) listed below. All rights reserved.
|
|
|
|
|
*
|
|
|
|
|
* Glenn Maynard
|
|
|
|
|
*/
|