Skip to content

Commit

Permalink
Fixed testgamecontroller output to make sense.
Browse files Browse the repository at this point in the history
  • Loading branch information
icculus committed Aug 28, 2013
1 parent aef52c3 commit 540cb53
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion test/testgamecontroller.c
Expand Up @@ -229,7 +229,7 @@ main(int argc, char *argv[])
/* Print information about the controller */
for (i = 0; i < SDL_NumJoysticks(); ++i) {
const char *name;
const char *description = "Joystick (not recognized as game controller)";
const char *description;

SDL_JoystickGetGUIDString(SDL_JoystickGetDeviceGUID(i),
guid, sizeof (guid));
Expand All @@ -238,8 +238,10 @@ main(int argc, char *argv[])
{
nController++;
name = SDL_GameControllerNameForIndex(i);
description = "Controller";
} else {
name = SDL_JoystickNameForIndex(i);
description = "Joystick";
}
SDL_Log("%s %d: %s (guid %s)\n", description, i, name ? name : "Unknown", guid);
}
Expand Down

0 comments on commit 540cb53

Please sign in to comment.