Don't hang testjoystick if we failed to open the device in the first place.

This commit is contained in:
Ryan C. Gordon 2012-12-11 11:41:06 -05:00
parent f8eaaf3a51
commit ba2a2af364

View file

@ -237,6 +237,7 @@ main(int argc, char *argv[])
if (joystick == NULL) {
if ( !reportederror ) {
printf("Couldn't open joystick %d: %s\n", atoi(argv[1]), SDL_GetError());
keepGoing = SDL_FALSE;
reportederror = SDL_TRUE;
}
} else {