[PR #83] [MERGED] Fix Steam Controller battery reporting in gamepad (Steam) mode #192

Closed
opened 2026-10-22 05:07:22 +00:00 by roman · 0 comments
Owner

📋 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)

  • afd4a9f Fix 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.

## 📋 Pull Request Information **Original PR:** https://github.com/safijari/openpuck/pull/83 **Author:** [@safijari](https://github.com/safijari) **Created:** 6/23/2026 **Status:** ✅ Merged **Merged:** 6/23/2026 **Merged by:** [@safijari](https://github.com/safijari) **Base:** `main` ← **Head:** `steam-battery-fix` --- ### 📝 Commits (1) - [`afd4a9f`](https://github.com/safijari/openpuck/commit/afd4a9f88c92edee57a6b12906d81798eee67d48) Fix Steam Controller battery reporting in gamepad (Steam) mode ### 📊 Changes **3 files changed** (+29 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `OpenPuck/puck_hid.cpp` (+18 -1) 📝 `OpenPuck/rf_link.cpp` (+9 -2) 📝 `OpenPuck/rf_link.h` (+2 -0) </details> ### 📄 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. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
roman 2026-10-22 05:07:22 +00:00
Sign in to join this conversation.
No labels
pull-request
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
safijari/openpuck#192
No description provided.