Update to SDL2

This commit is contained in:
Daniel Nagel 2014-09-01 16:35:19 +02:00
parent 1d096f7d02
commit afefac86ad
2 changed files with 3 additions and 7 deletions

View file

@ -13,11 +13,7 @@ extern "C" {
SDLJoystick::SDLJoystick(bool init_SDL ): thread(NULL), running(true) { SDLJoystick::SDLJoystick(bool init_SDL ): thread(NULL), running(true) {
if (init_SDL) if (init_SDL)
{ {
SDL_Init(SDL_INIT_JOYSTICK | SDL_INIT_VIDEO SDL_Init(SDL_INIT_JOYSTICK | SDL_INIT_VIDEO);
#ifndef _WIN32
| SDL_INIT_EVENTTHREAD
#endif
);
} }
fillMapping(); fillMapping();
@ -44,7 +40,7 @@ SDLJoystick::~SDLJoystick(){
} }
void SDLJoystick::startEventLoop(){ void SDLJoystick::startEventLoop(){
thread = SDL_CreateThread(SDLJoystickThreadWrapper, static_cast<void *>(this)); thread = SDL_CreateThread(SDLJoystickThreadWrapper, "joystick",static_cast<void *>(this));
} }
void SDLJoystick::ProcessInput(SDL_Event &event){ void SDLJoystick::ProcessInput(SDL_Event &event){

2
native

@ -1 +1 @@
Subproject commit 9a72d5323bfafdaf97aec583eefef9e51e0be594 Subproject commit d4014f5f7f73f3b3774c498ee5a0145752f9a25b