src/SDL.c
changeset 3269 a67a961e2171
parent 3243 5db962a9a991
child 3319 63d4517fc4ac
--- a/src/SDL.c	Sat Sep 19 06:24:07 2009 +0000
+++ b/src/SDL.c	Sat Sep 19 06:43:45 2009 +0000
@@ -277,76 +277,7 @@
     return SDL_REVISION;
 }
 
-#if defined(__OS2__)
-/* Building for OS/2 */
-#ifdef __WATCOMC__
-
-#define INCL_DOSERRORS
-#define INCL_DOSEXCEPTIONS
-#include <os2.h>
-
-/* Exception handler to prevent the Audio thread hanging, making a zombie process! */
-ULONG _System
-SDL_Main_ExceptionHandler(PEXCEPTIONREPORTRECORD pERepRec,
-                          PEXCEPTIONREGISTRATIONRECORD pERegRec,
-                          PCONTEXTRECORD pCtxRec, PVOID p)
-{
-    if (pERepRec->fHandlerFlags & EH_EXIT_UNWIND)
-        return XCPT_CONTINUE_SEARCH;
-    if (pERepRec->fHandlerFlags & EH_UNWINDING)
-        return XCPT_CONTINUE_SEARCH;
-    if (pERepRec->fHandlerFlags & EH_NESTED_CALL)
-        return XCPT_CONTINUE_SEARCH;
-
-    /* Do cleanup at every fatal exception! */
-    if (((pERepRec->ExceptionNum & XCPT_SEVERITY_CODE) ==
-         XCPT_FATAL_EXCEPTION) && (pERepRec->ExceptionNum != XCPT_BREAKPOINT)
-        && (pERepRec->ExceptionNum != XCPT_SINGLE_STEP)) {
-        if (SDL_initialized & SDL_INIT_AUDIO) {
-            /* This removes the zombie audio thread in case of emergency. */
-#ifdef DEBUG_BUILD
-            printf
-                ("[SDL_Main_ExceptionHandler] : Calling SDL_CloseAudio()!\n");
-#endif
-            SDL_CloseAudio();
-        }
-    }
-    return (XCPT_CONTINUE_SEARCH);
-}
-
-
-EXCEPTIONREGISTRATIONRECORD SDL_Main_xcpthand =
-    { 0, SDL_Main_ExceptionHandler };
-
-/* The main DLL entry for DLL Initialization and Uninitialization: */
-unsigned _System
-LibMain(unsigned hmod, unsigned termination)
-{
-    if (termination) {
-#ifdef DEBUG_BUILD
-/*    printf("[SDL DLL Unintialization] : Removing exception handler\n"); */
-#endif
-        DosUnsetExceptionHandler(&SDL_Main_xcpthand);
-        return 1;
-    } else {
-#ifdef DEBUG_BUILD
-        /* Make stdout and stderr unbuffered! */
-        setbuf(stdout, NULL);
-        setbuf(stderr, NULL);
-#endif
-        /* Fire up exception handler */
-#ifdef DEBUG_BUILD
-/*    printf("[SDL DLL Initialization] : Setting exception handler\n"); */
-#endif
-        /* Set exception handler */
-        DosSetExceptionHandler(&SDL_Main_xcpthand);
-
-        return 1;
-    }
-}
-#endif /* __WATCOMC__ */
-
-#elif defined(__WIN32__)
+#if defined(__WIN32__)
 
 #if !defined(HAVE_LIBC) || (defined(__WATCOMC__) && defined(BUILD_DLL))
 /* Need to include DllMain() on Watcom C for some reason.. */
@@ -368,6 +299,6 @@
 }
 #endif /* building DLL with Watcom C */
 
-#endif /* OS/2 elif __WIN32__ */
+#endif /* __WIN32__ */
 
 /* vi: set ts=4 sw=4 expandtab: */