mirror of
https://github.com/glfw/glfw.git
synced 2025-10-05 06:06:36 +00:00
Update events.c
This commit is contained in:
parent
7627c53d62
commit
90a3c7765b
@ -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
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user