glfw-net icon indicating copy to clipboard operation
glfw-net copied to clipboard

Gamepad and Joystick classes

Open ForeverZer0 opened this issue 6 years ago • 4 comments

Create a Joystick and Gamepad class to use them in a conventional and object-oriented way for the language.

ForeverZer0 avatar Apr 29 '19 06:04 ForeverZer0

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.

ForeverZer0 avatar Aug 12 '19 04:08 ForeverZer0

Any update on this?

fembiba avatar Jul 31 '20 11:07 fembiba

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.

ForeverZer0 avatar Jul 31 '20 21:07 ForeverZer0

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!

fembiba avatar Aug 02 '20 10:08 fembiba