Files
itgmania212121/stepmania/src/arch/ArchHooks/ArchHooks_Unix.cpp
T

54 lines
1.3 KiB
C++
Raw Normal View History

2003-07-24 08:19:20 +00:00
#include "global.h"
#include "RageLog.h"
2003-07-24 08:19:20 +00:00
#include "ArchHooks_Unix.h"
#include "archutils/Unix/SignalHandler.h"
2003-11-28 21:34:05 +00:00
#include "archutils/Unix/GetSysInfo.h"
2003-07-24 08:19:20 +00:00
#if defined(CRASH_HANDLER)
2003-07-24 08:19:20 +00:00
#include "archutils/Unix/CrashHandler.h"
#endif
#include "SDL_utils.h"
static void EmergencyShutdown( int signal )
{
/* If we don't actually use SDL for video, this should be a no-op. */
if( SDL_WasInit(SDL_INIT_VIDEO) )
SDL_QuitSubSystem(SDL_INIT_VIDEO);
}
2003-07-24 08:19:20 +00:00
ArchHooks_Unix::ArchHooks_Unix()
{
#if defined(CRASH_HANDLER)
2003-07-24 08:19:20 +00:00
CrashHandlerHandleArgs();
2003-11-11 23:36:31 +00:00
InitializeCrashHandler();
2003-07-24 08:19:20 +00:00
SignalHandler::OnClose( CrashSignalHandler );
#endif
/* Set up EmergencyShutdown, to try to shut down the window if we crash.
* This might blow up, so be sure to do it after the crash handler. */
SignalHandler::OnClose( EmergencyShutdown );
2003-07-24 08:19:20 +00:00
}
void ArchHooks_Unix::DumpDebugInfo()
{
2003-11-28 21:34:05 +00:00
CString sys;
int vers;
GetKernel( sys, vers );
2004-01-02 07:01:27 +00:00
LOG->Info( "OS: %s ver %06i", sys.c_str(), vers );
2003-11-28 21:34:05 +00:00
#if defined(CRASH_HANDLER)
LOG->Info( "Crash backtrace component: %s", BACKTRACE_METHOD_TEXT );
LOG->Info( "Crash lookup component: %s", BACKTRACE_LOOKUP_METHOD_TEXT );
2003-12-22 02:16:33 +00:00
#if defined(BACKTRACE_DEMANGLE_METHOD_TEXT)
2003-12-22 02:16:04 +00:00
LOG->Info( "Crash demangle component: %s", BACKTRACE_DEMANGLE_METHOD_TEXT );
#endif
2003-12-22 02:16:33 +00:00
#endif
}
2003-07-24 08:19:20 +00:00
/*
* Copyright (c) 2003 by the person(s) listed below. All rights reserved.
*
* Glenn Maynard
*/