Bumped SDL2 to the latest development version.

This commit is contained in:
fysx
2014-01-08 23:57:35 +01:00
parent 271c0c5d01
commit b92439b60c
537 changed files with 14598 additions and 19378 deletions
+7 -8
View File
@@ -251,15 +251,18 @@ main(int argc, char *argv[])
SDL_bool reportederror = SDL_FALSE;
SDL_bool keepGoing = SDL_TRUE;
SDL_Event event;
int device;
#ifdef ANDROID
joystick = SDL_JoystickOpen(0);
device = 0;
#else
joystick = SDL_JoystickOpen(atoi(argv[1]));
device = atoi(argv[1]);
#endif
joystick = SDL_JoystickOpen(device);
while ( keepGoing ) {
if (joystick == NULL) {
if ( !reportederror ) {
SDL_Log("Couldn't open joystick %d: %s\n", atoi(argv[1]), SDL_GetError());
SDL_Log("Couldn't open joystick %d: %s\n", device, SDL_GetError());
keepGoing = SDL_FALSE;
reportederror = SDL_TRUE;
}
@@ -279,7 +282,7 @@ main(int argc, char *argv[])
|| (event.type == SDL_MOUSEBUTTONDOWN)) {
keepGoing = SDL_FALSE;
} else if (event.type == SDL_JOYDEVICEADDED) {
joystick = SDL_JoystickOpen(atoi(argv[1]));
joystick = SDL_JoystickOpen(device);
break;
}
}
@@ -287,11 +290,7 @@ main(int argc, char *argv[])
}
SDL_QuitSubSystem(SDL_INIT_VIDEO | SDL_INIT_JOYSTICK);
#ifdef ANDROID
exit(0);
#else
return 0;
#endif
}
#else