ForeverZer0 / glfw-net

Complete, cross-platform, managed wrapper around the GLFW library for creating native windows with an OpenGL context.
MIT License
232 stars 49 forks source link

Gamepad and Joystick classes #5

Open ForeverZer0 opened 5 years ago

ForeverZer0 commented 5 years ago

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

ForeverZer0 commented 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.

fembiba commented 4 years ago

Any update on this?

ForeverZer0 commented 4 years ago

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.

fembiba commented 4 years ago

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!