Don't hang testjoystick if we failed to open the device in the first place.
authorRyan C. Gordon <icculus@icculus.org>
Tue, 11 Dec 2012 11:41:06 -0500
changeset 6732 b4201930fb9f
parent 6731 572559876818
child 6733 cfef740efada
Don't hang testjoystick if we failed to open the device in the first place.
test/testjoystick.c
--- a/test/testjoystick.c	Tue Dec 11 11:28:29 2012 -0500
+++ b/test/testjoystick.c	Tue Dec 11 11:41:06 2012 -0500
@@ -237,6 +237,7 @@
             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 {