Open ForeverZer0 opened 5 years ago
This will likely be added with the next update of the upstream. Currently, GLFW does not have an event driven callback for joysticks, which means the user has to manually poll and check for any changes. To make matters worse, this cannot be done on a separate thread due to limitations in the base library. This means it is at the complete mercy of the game loop and how often it can be polled, which is not a cheap operation, and can easily lead to input being missed between checks.
The next milestone of the upstream is supposed to have this issue fixed (was originally the 3.3 milestone, but got pushed to 3.4), so this will be implemented at that time.
Any update on this?
The upstream GLFW project has not yet implemented it unfortunately.
They have recently done some work with enabling/disabling joystick input with init hints, which is likely an important precursor to this, so I do hope that they won't push it back again. Joystick polling and haptic feedback are definitely some high-desired features that have been long-requested.
The upstream GLFW project has not yet implemented it unfortunately.
They have recently done some work with enabling/disabling joystick input with init hints, which is likely an important precursor to this, so I do hope that they won't push it back again. Joystick polling and haptic feedback are definitely some high-desired features that have been long-requested.
Thanks for answer!
Create a
Joystick
andGamepad
class to use them in a conventional and object-oriented way for the language.