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) {
if (init_SDL)
{
SDL_Init(SDL_INIT_JOYSTICK | SDL_INIT_VIDEO
#ifndef _WIN32
| SDL_INIT_EVENTTHREAD
#endif
);
SDL_Init(SDL_INIT_JOYSTICK | SDL_INIT_VIDEO);
}
fillMapping();
@ -44,7 +40,7 @@ SDLJoystick::~SDLJoystick(){
}
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){