fix(gamepad): correct battery reporting and Xbox Series support - #118
Merged
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #118 +/- ##
==========================================
- Coverage 73.36% 73.34% -0.02%
==========================================
Files 34 34
Lines 9208 9235 +27
Branches 3429 3439 +10
==========================================
+ Hits 6755 6773 +18
- Misses 1823 1826 +3
- Partials 630 636 +6
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 1 file with indirect coverage changes Continue to review full report in Codecov by Harness.
|
ReenigneArcher
force-pushed
the
fix/battery-state
branch
2 times, most recently
from
August 30, 2026 22:39
f2f2d7a to
57a76cb
Compare
ReenigneArcher
force-pushed
the
fix/battery-state
branch
from
August 30, 2026 23:04
57a76cb to
dad1edd
Compare
ReenigneArcher
marked this pull request as ready for review
August 31, 2026 01:03
Expand platform docs and windows-driver docs to explain that XInput returns BATTERY_TYPE_DISCONNECTED for VHF Xbox devices and that Steam hides battery indicators for wired virtual transports. Update compatibility-note numbering in the end-user gamepad guide, fix battery state cells to reference note 4 consistently, and mark Xbox Series Share button support correctly for Linux and Android. Add two integration tests: one asserting SDL exposes submitted battery for non-Xbox profiles, and one asserting XInput does not expose submitted Xbox battery.
Omit the Linux UHID Xbox battery descriptor and reports when the client declares no battery support (`has_battery = false`). This prevents phantom Linux power devices and false charge readings for clients like Moonlight Xbox that never send battery data. Also narrows the battery HID field to a two-bit categorical value matching the native Xbox Bluetooth level, updates related docs and compatibility matrix footnotes, and skips the XInput battery test when the VHF device is not enumerated in headless CI.
ReenigneArcher
force-pushed
the
fix/battery-state
branch
from
August 31, 2026 03:00
c30ca59 to
6d7a26b
Compare
Adjust the Linux UHID Xbox battery descriptor to use a byte-sized Battery Strength field with the native wireless charge values (4-7) instead of a packed two-bit field. This keeps SDL/Linux descriptor consumers compatible, preserves HIDAPI's expected layout, avoids the false 2% battery reading for clients without battery support, and updates the fixture and docs to match the new descriptor size and behavior.
ReenigneArcher
force-pushed
the
fix/battery-state
branch
from
August 31, 2026 20:42
0967858 to
4c7331e
Compare
Update the end-user gamepad guide with revised compatibility statuses across clients and backends, including new 🟡 “dev/future release” semantics. The matrix now reflects current findings for Xbox battery/share support, PlayStation touchpad/adaptive-trigger behavior, and Switch Pro LED/capture paths, with a fully reorganized and expanded note table (1–23) to clarify ownership, limitations, and tracking links.
ReenigneArcher
force-pushed
the
fix/battery-state
branch
from
August 31, 2026 21:36
4c7331e to
360e51d
Compare
|
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.



Description
Screenshot
Issues Fixed or Closed
Roadmap Issues
Type of Change
Checklist
AI Usage
See our AI usage policy.