Update events.c

This commit is contained in:
IntellectualKitty 2016-11-25 21:00:37 -07:00 committed by GitHub
parent 7627c53d62
commit 90a3c7765b

View File

@ -463,17 +463,19 @@ static void joystick_callback(int jid, int event)
{ {
if (event == GLFW_CONNECTED) if (event == GLFW_CONNECTED)
{ {
int axisCount, buttonCount; int axisCount, buttonCount, hatCount;
glfwGetJoystickAxes(jid, &axisCount); glfwGetJoystickAxes(jid, &axisCount);
glfwGetJoystickButtons(jid, &buttonCount); glfwGetJoystickButtons(jid, &buttonCount);
glfwGetJoystickHats(jid, &hatCount);
printf("%08x at %0.3f: Joystick %i (%s) was connected with %i axes and %i buttons\n", printf("%08x at %0.3f: Joystick %i (%s) was connected with %i axes, %i buttons, and %i hats\n",
counter++, glfwGetTime(), counter++, glfwGetTime(),
jid, jid,
glfwGetJoystickName(jid), glfwGetJoystickName(jid),
axisCount, axisCount,
buttonCount); buttonCount,
hatCount);
} }
else else
{ {