test/testjoystick.c
changeset 6733 cfef740efada
parent 6732 b4201930fb9f
child 6736 03dd4a1d06e9
     1.1 --- a/test/testjoystick.c	Tue Dec 11 11:41:06 2012 -0500
     1.2 +++ b/test/testjoystick.c	Tue Dec 11 11:59:29 2012 -0500
     1.3 @@ -219,11 +219,15 @@
     1.4              fprintf(stderr, "SDL_JoystickOpen(%d) failed: %s\n", i,
     1.5                      SDL_GetError());
     1.6          } else {
     1.7 +            JoystickGUID guid = SDL_JoystickGetGUID(joystick);
     1.8 +            char *guidstr = SDL_JoystickGetGUIDString(guid);
     1.9              printf("       axes: %d\n", SDL_JoystickNumAxes(joystick));
    1.10              printf("      balls: %d\n", SDL_JoystickNumBalls(joystick));
    1.11              printf("       hats: %d\n", SDL_JoystickNumHats(joystick));
    1.12              printf("    buttons: %d\n", SDL_JoystickNumButtons(joystick));
    1.13              printf("instance id: %d\n", SDL_JoystickInstanceID(joystick));
    1.14 +            printf("       guid: %s\n", guidstr);
    1.15 +            SDL_free(guidstr);
    1.16              SDL_JoystickClose(joystick);
    1.17          }
    1.18      }