More work on Windows build issues.

--HG--
branch : SDL-1.2
This commit is contained in:
Ryan C. Gordon
2011-09-11 04:38:50 -04:00
parent 984c3ec317
commit 01a7b1718b
4 changed files with 7 additions and 11 deletions

View File

@@ -65,7 +65,7 @@ typedef struct ThreadStartParms
pfnSDL_CurrentEndThread pfnCurrentEndThread;
} tThreadStartParms, *pThreadStartParms;
static DWORD WINAPI RunThread(LPVOID *data)
static unsigned __stdcall RunThread(void *data)
{
pThreadStartParms pThreadParms = (pThreadStartParms)data;
pfnSDL_CurrentEndThread pfnCurrentEndThread = NULL;
@@ -99,7 +99,6 @@ int SDL_SYS_CreateThread(SDL_Thread *thread, void *args)
pfnSDL_CurrentEndThread pfnEndThread = _endthreadex;
#endif
#endif /* SDL_PASSED_BEGINTHREAD_ENDTHREAD */
DWORD threadid = 0;
pThreadStartParms pThreadParms = (pThreadStartParms)SDL_malloc(sizeof(tThreadStartParms));
if (!pThreadParms) {
SDL_OutOfMemory();
@@ -112,10 +111,12 @@ int SDL_SYS_CreateThread(SDL_Thread *thread, void *args)
pThreadParms->args = args;
if (pfnBeginThread) {
unsigned threadid = 0;
thread->handle = (SYS_ThreadHandle)
((size_t) pfnBeginThread(NULL, 0, RunThread,
pThreadParms, 0, &threadid));
} else {
DWORD threadid = 0;
thread->handle = CreateThread(NULL, 0, RunThread, pThreadParms, 0, &threadid);
}
if (thread->handle == NULL) {