Fixed testgamecontroller output to make sense.
--HG-- extra : rebase_source : 88c573edaf1da2153ada5b4f2c6893e91add2310
This commit is contained in:
parent
777731aa02
commit
bbbade42fa
1 changed files with 3 additions and 1 deletions
|
@ -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));
|
||||
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue