From 0a130b7f8f0121d271342b6bb82e8d17b67c90d0 Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Tue, 11 Dec 2012 11:59:29 -0500 Subject: [PATCH] Print stick GUID in testjoystick. --- test/testjoystick.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/testjoystick.c b/test/testjoystick.c index 708ba5d82..6f53321e7 100644 --- a/test/testjoystick.c +++ b/test/testjoystick.c @@ -219,11 +219,15 @@ main(int argc, char *argv[]) fprintf(stderr, "SDL_JoystickOpen(%d) failed: %s\n", i, SDL_GetError()); } else { + JoystickGUID guid = SDL_JoystickGetGUID(joystick); + char *guidstr = SDL_JoystickGetGUIDString(guid); printf(" axes: %d\n", SDL_JoystickNumAxes(joystick)); printf(" balls: %d\n", SDL_JoystickNumBalls(joystick)); printf(" hats: %d\n", SDL_JoystickNumHats(joystick)); printf(" buttons: %d\n", SDL_JoystickNumButtons(joystick)); printf("instance id: %d\n", SDL_JoystickInstanceID(joystick)); + printf(" guid: %s\n", guidstr); + SDL_free(guidstr); SDL_JoystickClose(joystick); } }