Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
Print stick GUID in testjoystick.
  • Loading branch information
icculus committed Dec 11, 2012
1 parent 9fb45cb commit 0a130b7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions test/testjoystick.c
Expand Up @@ -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);
}
}
Expand Down

0 comments on commit 0a130b7

Please sign in to comment.