Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Xbox One Controller issues #7896

Closed
Arcnor opened this issue Jun 30, 2023 · 6 comments
Closed

Xbox One Controller issues #7896

Arcnor opened this issue Jun 30, 2023 · 6 comments

Comments

@Arcnor
Copy link

Arcnor commented Jun 30, 2023

Hi,

I'm having the most strange issue, was hesitant about posting it but maybe somebody has an idea.

I'm using SDL from versions 2.0.12 up to 2.26.5 (tried all of them) on Windows 10. I'm using testgamecontroller.c. My Xbox One Controllers (using a Wireless Adaptor) are being detected by SDL:

INFO: XBox One Controller 0: Xbox One Controller (guid 030000005e040000dd02000000007200, VID 0x045e, PID 0x02dd, player index = 0)
INFO: There are 1 game controller(s) attached (1 joystick(s))
INFO: Attempting to open device 0, guid 030000005e040000dd02000000007200

However, no buttons or axis or anything are being shown. While I was changing versions, suddenly everything started working, but after I disconnected the Wireless Adaptor and connected it again, it failed again (but continued to show the controller connected, as above).

The controllers themselves (I tried multiple of them) are working fine with all other apps on my system, be it the Windows "Set up USB Game Controllers" app, Chrome, Unity, Steam, etc... I also tried another controller (8BitDo Ultimate) and it worked fine with every SDL version, as expected.

I also debugged a bit, and it seems SDL is detecting my controller using "RAWINPUT", which also calls XInput among other layers. I don't understand how all the different layers work, but the XInput button & axis data was there and it seemed to be changing. However, that seems to be ignored in favor of SDL_HidP_GetData at RAWINPUT_HandleStatePacket, and that always returns 0.

I understand this is probably something to do with my system (I've restarted and closed every single app before running mine as well, just in case, to no avail. But as mentioned, other apps seem to be fine with the controllers) but maybe somebody has some sort of idea on how to fix this.

Thanks in advance.

@slouken
Copy link
Collaborator

slouken commented Jun 30, 2023

Do you use Remote Desktop into this machine? If so, this is being tracked at #7759 and is being investigated by Microsoft.

@Arcnor
Copy link
Author

Arcnor commented Jun 30, 2023

Hmm, I actually do! But I haven't done so since restarting and still doesn't work (except randomly and briefly, as mentioned). I agree it looks very similar, but also, I think I'm receiving WM_INPUT messages, although I don't think they change anything.

In any case, I'll just wait for the resolution of that bug for now, and it's good to see I'm not crazy :D.

@Squall-Leonhart
Copy link

Squall-Leonhart commented Jul 1, 2023

This is a known issue with WGI having its device invalidated by the new user session, the original user session must be logged off and back in to require.

You'll also find that the xbox accessories app can send vibration controls but the test screen doesn't respond to any button presses.

microsoft/GDK#28

@Arcnor
Copy link
Author

Arcnor commented Jul 2, 2023

Thanks, the only problem as I mention above is that this doesn't work even after restarting (unless logging off won't work the same way as restarting, I can also try that) but I agree this looks really similar, hopefully that's the real issue and we get a fix soon.

@Arcnor
Copy link
Author

Arcnor commented Jul 2, 2023

By the way, I've also found out that this tool https://generalarcade.com/gamepadtool/ works all the time for me, it seems to be using SDL 2.0.7, not sure if WGI was not being used there yet or what other difference could be there.

@slouken
Copy link
Collaborator

slouken commented Jul 2, 2023

Yeah, the older version of SDL isn't using raw input. You can get that behavior in the new SDL by setting the environment variable SDL_JOYSTICK_RAWINPUT to 0

@slouken slouken closed this as completed Nov 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants