src/SDL.c
changeset 3269 a67a961e2171
parent 3243 5db962a9a991
child 3319 63d4517fc4ac
     1.1 --- a/src/SDL.c	Sat Sep 19 06:24:07 2009 +0000
     1.2 +++ b/src/SDL.c	Sat Sep 19 06:43:45 2009 +0000
     1.3 @@ -277,76 +277,7 @@
     1.4      return SDL_REVISION;
     1.5  }
     1.6  
     1.7 -#if defined(__OS2__)
     1.8 -/* Building for OS/2 */
     1.9 -#ifdef __WATCOMC__
    1.10 -
    1.11 -#define INCL_DOSERRORS
    1.12 -#define INCL_DOSEXCEPTIONS
    1.13 -#include <os2.h>
    1.14 -
    1.15 -/* Exception handler to prevent the Audio thread hanging, making a zombie process! */
    1.16 -ULONG _System
    1.17 -SDL_Main_ExceptionHandler(PEXCEPTIONREPORTRECORD pERepRec,
    1.18 -                          PEXCEPTIONREGISTRATIONRECORD pERegRec,
    1.19 -                          PCONTEXTRECORD pCtxRec, PVOID p)
    1.20 -{
    1.21 -    if (pERepRec->fHandlerFlags & EH_EXIT_UNWIND)
    1.22 -        return XCPT_CONTINUE_SEARCH;
    1.23 -    if (pERepRec->fHandlerFlags & EH_UNWINDING)
    1.24 -        return XCPT_CONTINUE_SEARCH;
    1.25 -    if (pERepRec->fHandlerFlags & EH_NESTED_CALL)
    1.26 -        return XCPT_CONTINUE_SEARCH;
    1.27 -
    1.28 -    /* Do cleanup at every fatal exception! */
    1.29 -    if (((pERepRec->ExceptionNum & XCPT_SEVERITY_CODE) ==
    1.30 -         XCPT_FATAL_EXCEPTION) && (pERepRec->ExceptionNum != XCPT_BREAKPOINT)
    1.31 -        && (pERepRec->ExceptionNum != XCPT_SINGLE_STEP)) {
    1.32 -        if (SDL_initialized & SDL_INIT_AUDIO) {
    1.33 -            /* This removes the zombie audio thread in case of emergency. */
    1.34 -#ifdef DEBUG_BUILD
    1.35 -            printf
    1.36 -                ("[SDL_Main_ExceptionHandler] : Calling SDL_CloseAudio()!\n");
    1.37 -#endif
    1.38 -            SDL_CloseAudio();
    1.39 -        }
    1.40 -    }
    1.41 -    return (XCPT_CONTINUE_SEARCH);
    1.42 -}
    1.43 -
    1.44 -
    1.45 -EXCEPTIONREGISTRATIONRECORD SDL_Main_xcpthand =
    1.46 -    { 0, SDL_Main_ExceptionHandler };
    1.47 -
    1.48 -/* The main DLL entry for DLL Initialization and Uninitialization: */
    1.49 -unsigned _System
    1.50 -LibMain(unsigned hmod, unsigned termination)
    1.51 -{
    1.52 -    if (termination) {
    1.53 -#ifdef DEBUG_BUILD
    1.54 -/*    printf("[SDL DLL Unintialization] : Removing exception handler\n"); */
    1.55 -#endif
    1.56 -        DosUnsetExceptionHandler(&SDL_Main_xcpthand);
    1.57 -        return 1;
    1.58 -    } else {
    1.59 -#ifdef DEBUG_BUILD
    1.60 -        /* Make stdout and stderr unbuffered! */
    1.61 -        setbuf(stdout, NULL);
    1.62 -        setbuf(stderr, NULL);
    1.63 -#endif
    1.64 -        /* Fire up exception handler */
    1.65 -#ifdef DEBUG_BUILD
    1.66 -/*    printf("[SDL DLL Initialization] : Setting exception handler\n"); */
    1.67 -#endif
    1.68 -        /* Set exception handler */
    1.69 -        DosSetExceptionHandler(&SDL_Main_xcpthand);
    1.70 -
    1.71 -        return 1;
    1.72 -    }
    1.73 -}
    1.74 -#endif /* __WATCOMC__ */
    1.75 -
    1.76 -#elif defined(__WIN32__)
    1.77 +#if defined(__WIN32__)
    1.78  
    1.79  #if !defined(HAVE_LIBC) || (defined(__WATCOMC__) && defined(BUILD_DLL))
    1.80  /* Need to include DllMain() on Watcom C for some reason.. */
    1.81 @@ -368,6 +299,6 @@
    1.82  }
    1.83  #endif /* building DLL with Watcom C */
    1.84  
    1.85 -#endif /* OS/2 elif __WIN32__ */
    1.86 +#endif /* __WIN32__ */
    1.87  
    1.88  /* vi: set ts=4 sw=4 expandtab: */