Joystick Callback Functions?


Hi everyone,

I have been reading the documentation regarding joystick input and it sounds like if I want to use gamepads/joysticks in my application, I must manually check the state of each button/axis for each connected joystick every time my input handling method is called. This seems inneficient and I cannot help but wonder if I missed something in the docs. I see that you can set a callback method to be triggered when keyboard keys are pressed via glfwSetKeyCallback(). Is there any equivalent of this for joysticks? The only slightly related method I can find is for a callback function to be triggered when joysticks are connected/disconnected.


An issue for Joystick callbacks exists on the GLFW github site. This is currently tabled for the 3.3 milestone, but I don’t know what the progress status is on this individual item.