src/joystick/windows/SDL_windowsjoystick.c
changeset 10146 471eb08040ce
parent 9998 f67cf37e9cd4
child 10147 ddbdc9c1b92f
     1.1 --- a/src/joystick/windows/SDL_windowsjoystick.c	Tue Apr 12 14:38:50 2016 -0400
     1.2 +++ b/src/joystick/windows/SDL_windowsjoystick.c	Tue Apr 12 16:45:10 2016 -0400
     1.3 @@ -35,13 +35,13 @@
     1.4  #include "SDL_error.h"
     1.5  #include "SDL_assert.h"
     1.6  #include "SDL_events.h"
     1.7 -#include "SDL_thread.h"
     1.8  #include "SDL_timer.h"
     1.9  #include "SDL_mutex.h"
    1.10  #include "SDL_events.h"
    1.11  #include "SDL_hints.h"
    1.12  #include "SDL_joystick.h"
    1.13  #include "../SDL_sysjoystick.h"
    1.14 +#include "../thread/SDL_systhread.h"
    1.15  #if !SDL_EVENTS_DISABLED
    1.16  #include "../../events/SDL_events_c.h"
    1.17  #endif
    1.18 @@ -301,18 +301,9 @@
    1.19      SDL_SYS_JoystickDetect();
    1.20  
    1.21      if (!s_threadJoystick) {
    1.22 +        /* spin up the thread to detect hotplug of devices */
    1.23          s_bJoystickThreadQuit = SDL_FALSE;
    1.24 -        /* spin up the thread to detect hotplug of devices */
    1.25 -#if defined(__WIN32__) && !defined(HAVE_LIBC)
    1.26 -#undef SDL_CreateThread
    1.27 -#if SDL_DYNAMIC_API
    1.28 -        s_threadJoystick= SDL_CreateThread_REAL(SDL_JoystickThread, "SDL_joystick", NULL, NULL, NULL);
    1.29 -#else
    1.30 -        s_threadJoystick= SDL_CreateThread(SDL_JoystickThread, "SDL_joystick", NULL, NULL, NULL);
    1.31 -#endif
    1.32 -#else
    1.33 -        s_threadJoystick = SDL_CreateThread(SDL_JoystickThread, "SDL_joystick", NULL);
    1.34 -#endif
    1.35 +        s_threadJoystick = SDL_CreateThreadInternal(SDL_JoystickThread, "SDL_joystick", 64 * 1024, NULL);
    1.36      }
    1.37      return SDL_SYS_NumJoysticks();
    1.38  }