0xcafed00d / joystick

Go Joystick API
MIT License
59 stars 17 forks source link

does not work on windows #8

Open qianjiachun opened 9 months ago

qianjiachun commented 9 months ago

I tried the code for joysticktest.go and modified the jsid, both 0 and 1 cannot read the input of the game controller.

system: win11 gamepad: xbox

image

SIMULATAN commented 3 months ago

Same here, even on Windows 10. Xbox One Controller with the share button. Will try to debug soon-ish

0xcafed00d commented 3 months ago

I've only just upgraded my PC to a spec that Microsoft will let me run windows 11 on. It seems that the old win32 api that I use for this lib does not work correctly with the newer xbox controllers, it lets you enumerate the controller but does not return any usable data. I'll need to use the XInput api in order to read these controllers. Its annoying as not all controllers work with XInput, so now 2 different APIs have to be used to read the joysticks.