List enumerated joysticks in terminal output.

This commit is contained in:
Brandon Wright 2017-11-30 18:38:09 -06:00
parent 12d73bbf25
commit b7a2486ace
1 changed files with 7 additions and 0 deletions

View File

@ -463,6 +463,13 @@ JoyDevice::JoyDevice (unsigned int device_num)
calibration[i].center = 0;
}
printf ("Joystick %d, %s:\n %d axes, %d buttons, %d hats\n",
device_num + 1,
SDL_JoystickName (filedes),
SDL_JoystickNumButtons (filedes),
num_axes,
num_hats);
memset (axis, 0, sizeof (int) * num_axes);
return;