Don't hang testjoystick if we failed to open the device in the first place.
This commit is contained in:
parent
f8eaaf3a51
commit
ba2a2af364
1 changed files with 1 additions and 0 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue