Skip to content

fix(horipad_steam): : invert gyroscope values and prevent UHID timeout#540

Merged
ShadowApex merged 3 commits intoShadowBlip:mainfrom
honjow:hori_fix
Mar 11, 2026
Merged

fix(horipad_steam): : invert gyroscope values and prevent UHID timeout#540
ShadowApex merged 3 commits intoShadowBlip:mainfrom
honjow:hori_fix

Conversation

@honjow
Copy link
Copy Markdown
Contributor

@honjow honjow commented Mar 1, 2026

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.

@ShadowApex
Copy link
Copy Markdown
Contributor

Are we sure the horipad gyro uses inverted values or is this an issue with the mount matrix of the source device?

@honjow
Copy link
Copy Markdown
Contributor Author

honjow commented Mar 3, 2026

Are we sure the horipad gyro uses inverted values or is this an issue with the mount matrix of the source device?

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.

honjow added 3 commits March 6, 2026 17:07
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
Copy link
Copy Markdown
Contributor

@ShadowApex ShadowApex left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for confirming that! Looks good!

@ShadowApex ShadowApex merged commit 66a2d95 into ShadowBlip:main Mar 11, 2026
3 checks passed
@github-actions
Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 0.75.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants