Mercurial > sdl-ios-xcode
comparison src/thread/win32/SDL_systhread.c @ 1251:86d0d01290ea
Updated Windows CE/PocketPC support...adds GAPI driver, landscape mode,
updated project files, VS2005 support, VGA mode, more device support, etc,
etc, etc.
Fixes Bugzilla #47 and #28.
--ryan.
author | Ryan C. Gordon <icculus@icculus.org> |
---|---|
date | Thu, 19 Jan 2006 08:43:00 +0000 |
parents | 09bc22169702 |
children | c9b51268668f |
comparison
equal
deleted
inserted
replaced
1250:a4d515d0fc3a | 1251:86d0d01290ea |
---|---|
28 /* Win32 thread management routines for SDL */ | 28 /* Win32 thread management routines for SDL */ |
29 | 29 |
30 #include <stdio.h> | 30 #include <stdio.h> |
31 #include <stdlib.h> | 31 #include <stdlib.h> |
32 #include <windows.h> | 32 #include <windows.h> |
33 | |
34 #ifndef _WIN32_WCE | |
33 #include <process.h> | 35 #include <process.h> |
36 #endif | |
34 | 37 |
35 #include "SDL_error.h" | 38 #include "SDL_error.h" |
36 #include "SDL_thread.h" | 39 #include "SDL_thread.h" |
37 #include "SDL_systhread.h" | 40 #include "SDL_systhread.h" |
38 | 41 |
51 * Avoid CreateThread: https://bugzilla.libsdl.org/show_bug.cgi?id=22 | 54 * Avoid CreateThread: https://bugzilla.libsdl.org/show_bug.cgi?id=22 |
52 * | 55 * |
53 * have to use _beginthreadex if we want the returned handle | 56 * have to use _beginthreadex if we want the returned handle |
54 * to be accessible after the thread exits | 57 * to be accessible after the thread exits |
55 * threads created with _beginthread auto-close the handle | 58 * threads created with _beginthread auto-close the handle |
59 * Windows CE still use CreateThread. | |
56 */ | 60 */ |
61 #ifdef _WIN32_WCE | |
62 thread->handle = CreateThread(NULL, 0, RunThread, args, 0, &threadid); | |
63 #else | |
57 thread->handle = (SYS_ThreadHandle) _beginthreadex(NULL, 0, RunThread, | 64 thread->handle = (SYS_ThreadHandle) _beginthreadex(NULL, 0, RunThread, |
58 args, 0, &threadid); | 65 args, 0, &threadid); |
66 #endif | |
59 if (thread->handle == NULL) { | 67 if (thread->handle == NULL) { |
60 SDL_SetError("Not enough resources to create thread"); | 68 SDL_SetError("Not enough resources to create thread"); |
61 return(-1); | 69 return(-1); |
62 } | 70 } |
63 return(0); | 71 return(0); |