glfwGetGamepadState always returns GLFW_PRESS for some buttons

Started by Cornix, November 25, 2018, 14:25:28

Previous topic - Next topic



I am playing around with Gamepads and I have a hard time getting the GLFW gamepad support running. With one controller I have lying around I am getting weird results after calling the glfwGetGamepadState.method.

Here are some facts:
* glfwJoystickPresent returns true for the controller
* glfwJoystickIsGamepad returns true also

* glfwGetJoystickName is "NEXT SNES Controller"
* glfwGetGamepadName is also "NEXT SNES Controller"
* glfwGetJoystickGUID is "030000001008000001e5000000000000"

* glfwGetGamepadState returns true

* My version of LWJGL is: lwjgl-stable-2018-06-05 (LWJGL 3.1.7 SNAPSHOT build 8 )

* The controller works perfectly with other games and emulators. All buttons are correctly identified and read.

Here is the problem:
GLFW correctly identifies and reads the buttons A, B, X, Y, Left Bumper, Start, Back, Right D-PAD and Down D-PAD.
The Right Bumper is not found at all and the Up and Left D-Pad values are inverted!
Left D-Pad is always registered as being "pressed" unless I actually press the button in which case it will "released". The same applies to Up D-Pad.
The Right Bumper is never pressed (as reported by glfwGetGamepadState) no matter what I do. However, it can be found with the low-level glfwGetJoystickButtons method!

What should I do about this? What CAN I do?

I would much prefer to use the high-level glfwGetGamepadState methods rather than re-invent the wheel.

Thanks for any help!