summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFranklin Wei <franklin@rockbox.org>2019-07-28 14:27:49 -0400
committerFranklin Wei <franklin@rockbox.org>2019-07-28 14:27:49 -0400
commitd8330c9c18ac227800ed7dc9c6ae72946e92e4fb (patch)
treebc2cb5d314929bd3aed5d97c30c1a69e9982715b
parent090bdedc62c7f35cbbe5cc5afb21836c3dc66101 (diff)
downloadrockbox-d8330c9c18ac227800ed7dc9c6ae72946e92e4fb.tar.gz
rockbox-d8330c9c18ac227800ed7dc9c6ae72946e92e4fb.zip
sdl: gut OS/2, win32 code from SDL.c
This should help with compiling win32 simulators. Change-Id: Icfbf78f7d0a8b0ddebffa8daac3adf55ac21f139
-rw-r--r--apps/plugins/sdl/src/SDL.c95
1 files changed, 0 insertions, 95 deletions
diff --git a/apps/plugins/sdl/src/SDL.c b/apps/plugins/sdl/src/SDL.c
index 87f1b1af2a..bdd5c6d0d1 100644
--- a/apps/plugins/sdl/src/SDL.c
+++ b/apps/plugins/sdl/src/SDL.c
@@ -253,98 +253,3 @@ const SDL_version * SDL_Linked_Version(void)
{
return(&version);
}
-
-#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__) && !defined(__SYMBIAN32__)
-
-#if !defined(HAVE_LIBC) || (defined(__WATCOMC__) && defined(BUILD_DLL))
-/* Need to include DllMain() on Watcom C for some reason.. */
-#define WIN32_LEAN_AND_MEAN
-#include <windows.h>
-
-BOOL APIENTRY _DllMainCRTStartup( HANDLE hModule,
- DWORD ul_reason_for_call,
- LPVOID lpReserved )
-{
- switch (ul_reason_for_call) {
- case DLL_PROCESS_ATTACH:
- case DLL_THREAD_ATTACH:
- case DLL_THREAD_DETACH:
- case DLL_PROCESS_DETACH:
- break;
- }
- return TRUE;
-}
-#endif /* building DLL with Watcom C */
-
-#endif /* OS/2 elif __WIN32__ */