feat(gamepad): improve Switch Pro motion and LED support - #114
Merged
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #114 +/- ##
==========================================
+ Coverage 72.76% 73.34% +0.58%
==========================================
Files 34 34
Lines 8969 9108 +139
Branches 3329 3386 +57
==========================================
+ Hits 6526 6680 +154
+ Misses 2132 2119 -13
+ Partials 311 309 -2
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/switch-improvements
branch
6 times, most recently
from
August 27, 2026 22:14
7766ae1 to
8bef278
Compare
Route Linux Switch Pro controllers through descriptor-driven UHID, share the native handshake/reply protocol with Windows, and pack live IMU samples into Switch input reports. The API, control UI, tests, and docs now expose Switch Pro player LED output support and document the updated Linux backend behavior.
ReenigneArcher
force-pushed
the
fix/switch-improvements
branch
from
August 27, 2026 23:29
8bef278 to
bfeef3c
Compare
Set the Switch Pro profile version to `0x0210` (matching physical hardware revision behavior) and extend tests to assert the profile version and Windows HID `VersionNumber` exposure. Update platform and end-user compatibility docs with revised Switch Pro motion/battery status, HOME LED limitations, and refreshed validation notes across Windows/Linux and Moonlight clients.
ReenigneArcher
force-pushed
the
fix/switch-improvements
branch
from
August 28, 2026 01:39
102f7c6 to
3c07292
Compare
Update native Switch Pro input reports to advance Nintendo's packet timer by three for each full-state IMU batch. This better matches physical controller behavior so Windows HID consumers can detect fresh motion data, and it documents the remaining Steam retest gap. Unit and Windows consumer tests were updated to cover the timer progression.
Replace the separate full-state timer (incrementing by 3) with a single per-device counter shared by both subcommand replies (0x21) and full-state input reports (0x30). The counter now increments by 1 per report, matching native controller behavior. On Windows the counter is stored per-device in the VHF record and stamped at submission time. The shared `next_switch_pro_packet_timer` helper is moved to `switch_pro_protocol.hpp` and accepts an optional override so callers can inject a specific value.
Cache the latest native Switch Pro input report in the Windows backend and resend it every 15 ms to match the controller's native 0x30 report cadence. This coalesces separate motion updates, adjusts HID consumer tests to match reports by type instead of exact packet counters, and updates the related Windows support documentation.
Refresh the end-user gamepad compatibility matrix and footnotes to match the latest validation results, including marking Switch Pro motion as working and renumbering related notes and references. Also fix the IDE docs run configuration to open the generated HTML from the current `cmake-build-release-mingw-ucrt64-ninja` path.
Update Linux backend test hooks to capture packet timer bytes from UHID input reports, and adjust the Switch Pro native protocol test to verify the motion input report timer increments from the prior subcommand reply timer. This replaces a brittle fixed timer-byte check with a sequence check that validates correct packet counter behavior.
Refactor the Windows consumer Switch handshake test by moving duplicated proprietary command write/read logic into a shared `send_switch_proprietary_command` helper. This keeps the test focused on expected replies while preserving the existing assertions and behavior.
ReenigneArcher
marked this pull request as ready for review
August 28, 2026 14:57
Updated the end-user compatibility guide to mark adaptive triggers as supported on the Linux host backend and refined the related compatibility note to reflect the upstream Moonlight/Sunshine protocol work that is merged but not yet in the latest released client. This keeps the public documentation aligned with the current backend and client support status.
|
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
Route Switch Pro controllers through native HID protocols, add IMU and player LED support, align report timing and device revision with physical hardware, and update compatibility documentation and tests.
Screenshot
Issues Fixed or Closed
Roadmap Issues
Type of Change
Checklist
AI Usage
See our AI usage policy.