fix(horipad_steam): : invert gyroscope values and prevent UHID timeout#540
Open
honjow wants to merge 3 commits intoShadowBlip:mainfrom
Open
fix(horipad_steam): : invert gyroscope values and prevent UHID timeout#540honjow wants to merge 3 commits intoShadowBlip:mainfrom
honjow wants to merge 3 commits intoShadowBlip:mainfrom
Conversation
pastaq
approved these changes
Mar 1, 2026
Contributor
|
Are we sure the horipad gyro uses inverted values or is this an issue with the mount matrix of the source device? |
Contributor
Author
When switching the target to DualSense or Deck-UHID, the motion control values are correct. I have tested on multiple devices, and only the horipad_steam target has the inversion issue. Therefore, the matrix problem can be ruled out. |
Without a reply, each GET_REPORT request times out after ~5 seconds, causing significant delays when Steam probes the device during controller enumeration.
According to SDL_hidapi_steam_hori.c lines 329-330, bytes 12-13 are read as yaw (imu_data[1]) and bytes 14-15 are read as roll (imu_data[2]). The previous field names had them reversed. https://github.com/libsdl-org/SDL/blob/main/src/joystick/hidapi/SDL_hidapi_steam_hori.c#L329-L330
SDL negates all three gyro axes when reading from this device, so we pre-negate the values here to produce the correct orientation after SDL's correction. https://github.com/libsdl-org/SDL/blob/main/src/joystick/hidapi/SDL_hidapi_steam_hori.c#L329-L331
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
With the current version, when using the horipad_steam target, it takes a long time to detect the target after switching. Additionally, all gyroscope sensor axes are inverted. Fix both of these issues.