mirror of
https://github.com/safijari/openpuck.git
synced 2026-11-03 22:30:22 +00:00
[PR #83] [MERGED] Fix Steam Controller battery reporting in gamepad (Steam) mode #192
Labels
No labels
pull-request
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
safijari/openpuck#192
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/safijari/openpuck/pull/83
Author: @safijari
Created: 6/23/2026
Status: ✅ Merged
Merged: 6/23/2026
Merged by: @safijari
Base:
main← Head:steam-battery-fix📝 Commits (1)
afd4a9fFix Steam Controller battery reporting in gamepad (Steam) mode📊 Changes
3 files changed (+29 additions, -3 deletions)
View changed files
📝
OpenPuck/puck_hid.cpp(+18 -1)📝
OpenPuck/rf_link.cpp(+9 -2)📝
OpenPuck/rf_link.h(+2 -0)📄 Description
SDL's SC2/Triton HIDAPI driver reads battery only from report 0x43 (ID_TRITON_BATTERY_STATUS) and ignores it unless the report is the full TritonBatteryStatus_t length (>= 15 bytes incl. id). The controller's verbatim-forwarded 0x43 is shorter, so SDL fell back to the "wired" glyph with no battery %, while the kernel hid-steam path (lizard mode) read it fine.
Push a synthesized full 14-byte 0x43 from g_battery every 2s in puck task() (keeping the verbatim forward for the lizard/kernel path), with a valid EChargeState so SDL reports ON_BATTERY + level. rf_link now also snapshots the charge-state byte (g_batteryState) next to g_battery.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.