comparison src/events/SDL_events.c @ 1402:d910939febfa

Use consistent identifiers for the various platforms we support. Make sure every source file includes SDL_config.h, so the proper system headers are chosen.
author Sam Lantinga <slouken@libsdl.org>
date Tue, 21 Feb 2006 08:46:50 +0000
parents 19418e4422cb
children 14717b52abc0
comparison
equal deleted inserted replaced
1401:1819fd069e89 1402:d910939febfa
17 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 17 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18 18
19 Sam Lantinga 19 Sam Lantinga
20 slouken@libsdl.org 20 slouken@libsdl.org
21 */ 21 */
22 #include "SDL_config.h"
22 23
23 /* General event handling code for SDL */ 24 /* General event handling code for SDL */
24 25
25 #include "SDL.h" 26 #include "SDL.h"
26 #include "SDL_syswm.h" 27 #include "SDL_syswm.h"
148 149
149 /* Create the lock and set ourselves active */ 150 /* Create the lock and set ourselves active */
150 #if !SDL_THREADS_DISABLED 151 #if !SDL_THREADS_DISABLED
151 SDL_EventQ.lock = SDL_CreateMutex(); 152 SDL_EventQ.lock = SDL_CreateMutex();
152 if ( SDL_EventQ.lock == NULL ) { 153 if ( SDL_EventQ.lock == NULL ) {
153 #ifdef macintosh /* MacOS classic you can't multithread, so no lock needed */ 154 #ifdef __MACOS__ /* MacOS classic you can't multithread, so no lock needed */
154 ; 155 ;
155 #else 156 #else
156 return(-1); 157 return(-1);
157 #endif 158 #endif
158 } 159 }
166 } 167 }
167 SDL_EventLock.safe = 0; 168 SDL_EventLock.safe = 0;
168 169
169 /* The event thread will handle timers too */ 170 /* The event thread will handle timers too */
170 SDL_SetTimerThreaded(2); 171 SDL_SetTimerThreaded(2);
171 #if (defined(_WIN32) && !defined(_WIN32_WCE)) && !defined(HAVE_LIBC) 172 #if (defined(__WIN32__) && !defined(_WIN32_WCE)) && !defined(HAVE_LIBC)
172 #undef SDL_CreateThread 173 #undef SDL_CreateThread
173 SDL_EventThread = SDL_CreateThread(SDL_GobbleEvents, NULL, NULL, NULL); 174 SDL_EventThread = SDL_CreateThread(SDL_GobbleEvents, NULL, NULL, NULL);
174 #else 175 #else
175 SDL_EventThread = SDL_CreateThread(SDL_GobbleEvents, NULL); 176 SDL_EventThread = SDL_CreateThread(SDL_GobbleEvents, NULL);
176 #endif 177 #endif