Hello, I’m writing 2 GLFW programs that are supposed to behave exactly the same.
One program is in C, the other one is in Go.
On these 2 programs, the binding for my PS4 Controller is not doing the same thing.
I’m testing both programs on the same laptop, Mac OSX arm64.
I’m testing both programs with the exact same controller connected in Bluetooth.
Both programs are using GLFW 7482de6071d21db77a7236155da44c172a7f6c9e (tag 3.3.8)
Both programs are using the same SDL_GameControllerDB.
Yet, axes[GLFW_GAMEPAD_AXIS_RIGHT_Y] reports wrong values in the C version.
Also, glfwGetJoystickName is not reporting the same name in the C version.
In the Go program:
- the mappings are here ludo/mappings.go at master · libretro/ludo · GitHub
- glfwGetJoystickName returns “PS4 Controller”
- GUID is 030000004c050000c405000000010000
- glfwJoystickPresent returns true
- This axis behaves correctly: GLFW_GAMEPAD_AXIS_RIGHT_Y value is 0, and varies between -1 and 1 when I move it.
In the C program:
- the mappings are here rombundler/mappings.h at 55d6cefe7616aaa96c21ddc8ee06ce82dc8f5021 · kivutar/rombundler · GitHub
- glfwGetJoystickName returns “DUALSHOCK 4 Wireless Controller”
- GUID is 030000004c050000c405000000010000
- glfwJoystickPresent returns true
- This axis behaves incorrectly: GLFW_GAMEPAD_AXIS_RIGHT_Y is -1, and it looks like GLFW_GAMEPAD_AXIS_RIGHT_TRIGGER is controlling the RIGHT_Y axis.
Do you have any idea of what could be causing this difference in glfwGetJoystickName and mapping?