Skip to content

Commit

Permalink
SDL_thread.h: add missing os/2 defines.
Browse files Browse the repository at this point in the history
(essentially replicates the windows case || SDL1.2 case.)
  • Loading branch information
slouken committed Aug 21, 2017
1 parent f6ad070 commit 9b3ec6a
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions include/SDL_thread.h
Expand Up @@ -118,6 +118,19 @@ SDL_CreateThread(SDL_ThreadFunction fn, const char *name, void *data,
#define SDL_CreateThread(fn, name, data) SDL_CreateThread(fn, name, data, (pfnSDL_CurrentBeginThread)_beginthreadex, (pfnSDL_CurrentEndThread)_endthreadex)
#endif

#elif defined(__OS2__)

/*
* just like the windows case above: We compile SDL2
* into a dll with Watcom's runtime statically linked.
*/
#define SDL_PASSED_BEGINTHREAD_ENDTHREAD
#include <process.h>
typedef int (*pfnSDL_CurrentBeginThread)(void (*func)(void *), void *, unsigned, void *arg);
typedef void (*pfnSDL_CurrentEndThread)(void);
#undef SDL_CreateThread
#define SDL_CreateThread(fn, name, data) SDL_CreateThread(fn, name, data, (pfnSDL_CurrentBeginThread)_beginthread, (pfnSDL_CurrentEndThread)_endthread)

#else

/**
Expand Down

0 comments on commit 9b3ec6a

Please sign in to comment.