Skip to content

Commit

Permalink
SDL_thread.h: fix os/2 defines (rev 11340:2688d85b817c was a missing …
Browse files Browse the repository at this point in the history
…patch)
  • Loading branch information
slouken committed Aug 28, 2017
1 parent fe21a74 commit bf12682
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions include/SDL_thread.h
Expand Up @@ -119,17 +119,24 @@ SDL_CreateThread(SDL_ThreadFunction fn, const char *name, void *data,
#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 int (*pfnSDL_CurrentBeginThread)(void (*func)(void *), void *, unsigned, void * /*arg*/);
typedef void (*pfnSDL_CurrentEndThread)(void);
extern DECLSPEC SDL_Thread *SDLCALL
SDL_CreateThread(SDL_ThreadFunction fn, const char *name, void *data,
pfnSDL_CurrentBeginThread pfnBeginThread,
pfnSDL_CurrentEndThread pfnEndThread);
#if defined(SDL_CreateThread) && SDL_DYNAMIC_API
#undef SDL_CreateThread
#define SDL_CreateThread(fn, name, data) SDL_CreateThread_REAL(fn, name, data, (pfnSDL_CurrentBeginThread)_beginthread, (pfnSDL_CurrentEndThread)_endthread)
#else
#define SDL_CreateThread(fn, name, data) SDL_CreateThread(fn, name, data, (pfnSDL_CurrentBeginThread)_beginthread, (pfnSDL_CurrentEndThread)_endthread)
#endif

#else

Expand Down

0 comments on commit bf12682

Please sign in to comment.