From d9164005212e4f6f680ee845ca85aea45de7ca4a Mon Sep 17 00:00:00 2001 From: rubidium Date: Mon, 7 Sep 2009 12:14:45 +0000 Subject: (svn r17453) -Add: crash logger for all Unixy OSes; should work for all, but I don't have all exotic machines so it might break compilation on the more exotic configurations --- src/sdl.cpp | 43 +------------------------------------------ 1 file changed, 1 insertion(+), 42 deletions(-) (limited to 'src/sdl.cpp') diff --git a/src/sdl.cpp b/src/sdl.cpp index 0650f8e29..389659e56 100644 --- a/src/sdl.cpp +++ b/src/sdl.cpp @@ -17,16 +17,6 @@ #include "sdl.h" #include -#ifdef UNIX -#include - -#ifdef __MORPHOS__ - /* The system supplied definition of SIG_DFL is wrong on MorphOS */ - #undef SIG_DFL - #define SIG_DFL (void (*)(int))0 -#endif -#endif - static int _sdl_usage; #ifdef DYNAMICALLY_LOADED_SDL @@ -86,26 +76,6 @@ static const char *LoadSdlDLL() #endif /* DYNAMICALLY_LOADED_SDL */ -#ifdef UNIX -static void SdlAbort(int sig) -{ - /* Own hand-made parachute for the cases of failed assertions. */ - SDL_CALL SDL_Quit(); - - switch (sig) { - case SIGSEGV: - case SIGFPE: - signal(sig, SIG_DFL); - raise(sig); - break; - - default: - break; - } -} -#endif - - const char *SdlOpen(uint32 x) { #ifdef DYNAMICALLY_LOADED_SDL @@ -115,19 +85,13 @@ const char *SdlOpen(uint32 x) } #endif if (_sdl_usage++ == 0) { - if (SDL_CALL SDL_Init(x) == -1) + if (SDL_CALL SDL_Init(x | SDL_INIT_NOPARACHUTE) == -1) return SDL_CALL SDL_GetError(); } else if (x != 0) { if (SDL_CALL SDL_InitSubSystem(x) == -1) return SDL_CALL SDL_GetError(); } -#ifdef UNIX - signal(SIGABRT, SdlAbort); - signal(SIGSEGV, SdlAbort); - signal(SIGFPE, SdlAbort); -#endif - return NULL; } @@ -137,11 +101,6 @@ void SdlClose(uint32 x) SDL_CALL SDL_QuitSubSystem(x); if (--_sdl_usage == 0) { SDL_CALL SDL_Quit(); - #ifdef UNIX - signal(SIGABRT, SIG_DFL); - signal(SIGSEGV, SIG_DFL); - signal(SIGFPE, SIG_DFL); - #endif } } -- cgit v1.2.3-54-g00ecf