changeset 5116:e337f792c6a7

Fixed compiling under Visual Studio
author Sam Lantinga <slouken@libsdl.org>
date Thu, 27 Jan 2011 15:31:00 -0800
parents 686d795b1b29
children 427998ff3bcf
files src/timer/SDL_timer.c src/timer/windows/SDL_systimer.c test/testatomic.c
diffstat 3 files changed, 7 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/timer/SDL_timer.c	Thu Jan 27 15:58:30 2011 -0600
+++ b/src/timer/SDL_timer.c	Thu Jan 27 15:31:00 2011 -0800
@@ -224,7 +224,13 @@
         }
 
         data->active = SDL_TRUE;
+        /* !!! FIXME: this is nasty. */
+#if (defined(__WIN32__) && !defined(_WIN32_WCE)) && !defined(HAVE_LIBC)
+#undef SDL_CreateThread
+        data->thread = SDL_CreateThread(SDL_TimerThread, data, NULL, NULL);
+#else
         data->thread = SDL_CreateThread(SDL_TimerThread, data);
+#endif
         if (!data->thread) {
             SDL_TimerQuit();
             return -1;
--- a/src/timer/windows/SDL_systimer.c	Thu Jan 27 15:58:30 2011 -0600
+++ b/src/timer/windows/SDL_systimer.c	Thu Jan 27 15:31:00 2011 -0800
@@ -24,6 +24,7 @@
 #ifdef SDL_TIMER_WINDOWS
 
 #include "../../core/windows/SDL_windows.h"
+#include <mmsystem.h>
 
 #include "SDL_timer.h"
 
--- a/test/testatomic.c	Thu Jan 27 15:58:30 2011 -0600
+++ b/test/testatomic.c	Thu Jan 27 15:31:00 2011 -0800
@@ -526,7 +526,6 @@
     ReaderData *data = (ReaderData *)_data;
     SDL_EventQueue *queue = data->queue;
     SDL_Event event;
-    int index;
 
     if (data->lock_free) {
         for ( ; ; ) {