mirror of
https://github.com/gwm17/glfw.git
synced 2024-11-23 02:38:52 -05:00
Add gamepad information to events test output
This commit is contained in:
parent
20e522cdf4
commit
08f01c31a0
|
@ -503,6 +503,20 @@ static void joystick_callback(int jid, int event)
|
||||||
axisCount,
|
axisCount,
|
||||||
buttonCount,
|
buttonCount,
|
||||||
hatCount);
|
hatCount);
|
||||||
|
|
||||||
|
if (glfwJoystickIsGamepad(jid))
|
||||||
|
{
|
||||||
|
printf(" Joystick %i (%s) has a gamepad mapping (%s)\n",
|
||||||
|
jid,
|
||||||
|
glfwGetJoystickGUID(jid),
|
||||||
|
glfwGetGamepadName(jid));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
printf(" Joystick %i (%s) has no gamepad mapping\n",
|
||||||
|
jid,
|
||||||
|
glfwGetJoystickGUID(jid));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue
Block a user