Fixed compiling under Visual Studio
authorSam Lantinga
Thu, 27 Jan 2011 15:31:00 -0800
changeset 5114e337f792c6a7
parent 5113 686d795b1b29
child 5115 427998ff3bcf
Fixed compiling under Visual Studio
src/timer/SDL_timer.c
src/timer/windows/SDL_systimer.c
test/testatomic.c
     1.1 --- a/src/timer/SDL_timer.c	Thu Jan 27 15:58:30 2011 -0600
     1.2 +++ b/src/timer/SDL_timer.c	Thu Jan 27 15:31:00 2011 -0800
     1.3 @@ -224,7 +224,13 @@
     1.4          }
     1.5  
     1.6          data->active = SDL_TRUE;
     1.7 +        /* !!! FIXME: this is nasty. */
     1.8 +#if (defined(__WIN32__) && !defined(_WIN32_WCE)) && !defined(HAVE_LIBC)
     1.9 +#undef SDL_CreateThread
    1.10 +        data->thread = SDL_CreateThread(SDL_TimerThread, data, NULL, NULL);
    1.11 +#else
    1.12          data->thread = SDL_CreateThread(SDL_TimerThread, data);
    1.13 +#endif
    1.14          if (!data->thread) {
    1.15              SDL_TimerQuit();
    1.16              return -1;
     2.1 --- a/src/timer/windows/SDL_systimer.c	Thu Jan 27 15:58:30 2011 -0600
     2.2 +++ b/src/timer/windows/SDL_systimer.c	Thu Jan 27 15:31:00 2011 -0800
     2.3 @@ -24,6 +24,7 @@
     2.4  #ifdef SDL_TIMER_WINDOWS
     2.5  
     2.6  #include "../../core/windows/SDL_windows.h"
     2.7 +#include <mmsystem.h>
     2.8  
     2.9  #include "SDL_timer.h"
    2.10  
     3.1 --- a/test/testatomic.c	Thu Jan 27 15:58:30 2011 -0600
     3.2 +++ b/test/testatomic.c	Thu Jan 27 15:31:00 2011 -0800
     3.3 @@ -526,7 +526,6 @@
     3.4      ReaderData *data = (ReaderData *)_data;
     3.5      SDL_EventQueue *queue = data->queue;
     3.6      SDL_Event event;
     3.7 -    int index;
     3.8  
     3.9      if (data->lock_free) {
    3.10          for ( ; ; ) {