-
Notifications
You must be signed in to change notification settings - Fork 2k
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
SDL2 fails to open Steam Controller (GET_ATTRIBUTES_VALUES failed for controller) #12166
Comments
I was able to compile the testgamecontroller.c and found out that the call to HidD_SetFeature in hid.c:908 returns 0: Lines 906 to 915 in 92fe3b1
I tried out the testcontroller of SDL3 and it works perfectly! So I tried to find out the difference and as it turns out, my device is not connected via bluetooth, thus in SDL3 it jumps into the non-BLE case (which missing in SDL2): SDL/src/joystick/hidapi/SDL_hidapi_steam.c Lines 333 to 342 in 6243a06
I copied that code to the SDL2 branch, set the So the main issue is that the packet is too small, as is even pointed out in a comment:
But that quirk is not passed to the subsequent calls -- as we can see, the else-case in SDL3 does it and passes the full 65 byte. For SetFeature, it seems to be enough to pass the full 65 bytes, but for the GetFeature, the result also changes as the skip byte is not needed and I couldn't get it easily to work with With the wired controller, it also didn't work, so I installed the firmware update as outlined here https://help.steampowered.com/en/faqs/view/1796-5FC3-88B3-C85F#switch and used my Bluetooth dongle. This seems to work! So I think unless someone wants to backport the non-bluetooth functionality to SDL2, this issue can safely be closed and I'll leave the comment here for others who look into this. |
I am trying to get the input-overlay plugin for OBS to work with the Steam Controller.
Unfortunately, it seems SDL2 fails to reset the controller as I get the error message:
I found this particular error message only once in the SDL codebase -- in SDL_hidapi_steam.c here:
SDL/src/joystick/hidapi/SDL_hidapi_steam.c
Lines 410 to 431 in 92fe3b1
So the controller seems to be detected correctly as a Steam Controller, but something fails when communicating with it.
I also tried out the gamepadtest.exe from univrsal/input-overlay#297, which has the same issue:
I don't know why it detects four devices 0--3, I only have one controller attached (I use the wireless dongle).
The input-overlay plugin uses SDL2 (2.30.4) and comes with a small client tool to read out the controls.
It is also able to load a
gamecontrollerdb.txt
from its working directory.While I don't know if that works correctly, I at least tried to place the gamecontrollerdb.txt from mdqinc/SDL_GameControllerDB there.
Then I checked its entries and my Steam\config\config.vdf files and found out that one line from my vdf was missing (the last below), so I used my own gamecontrollerdb.txt containing only my three lines:
But I didn't really expect the mapping to make a difference here.
I also checked my Steam Controller settings and if running Steam makes a difference (it does not).
These are my settings in Steam:
The device manager lists it as an
HID-compliant vendor-defined device
, its driver is steamxbox.sys 1.0.0.16 -- although the device propertyDriver version
states 10.0.26100.1882.(This is with the Xbox Extended Feature Support Driver; I have not checked the driver before, but if it could be useful I'll do that.)
I recently updated Windows and the driver was installed then as well, as it claims its first install date was 2025-01-10.
(Though I never tried the plugin or SDL with the controller before, so I am not sure this is related; I guess not.)
Do you have any ideas why it's not working?
I am happy to help with any further debugging and fixing, though I might need a few hints where to start as I am not too familiar with SDL and gamepads :)
The text was updated successfully, but these errors were encountered: