Skip to content

Support Nintendo Switch Pro Player LED output #113

Description

@ReenigneArcher

Summary

libvirtualhid does not expose Nintendo Switch Pro Controller Player LED changes
to consumers of the gamepad output callback. The virtual controller therefore
cannot forward the host-selected player number back through Sunshine and
Moonlight to the physical controller.

This is distinct from the DualSense player-indicator and MUTE-button LED work in
#97, which handles PlayStation output reports rather than Nintendo Player LEDs.

Tested paths

  • Client: Moonlight Qt
  • Host application: Sunshine
  • Host backends: Windows Virtual HID Driver and Linux libvirtualhid
  • Virtual profile: Nintendo Switch Pro Controller
  • Test application: Steam controller tester / Steam Input

The Player LED feature did not work on either host backend.

Current implementation

The Switch Pro profile supports native output reports, but output parsing only
surfaces Nintendo rumble. The Set Player Lights subcommand (0x30) is not
decoded into a structured output that a streaming host can forward. The current
Linux uinput route also cannot receive native HID output reports, so Linux may
depend on moving Switch Pro to a UHID-backed route.

Relevant code:

  • src/core/report.cpp: Switch Pro branch in parse_output_reports()
  • src/platform/windows/shared/switch_pro_protocol.hpp: Switch initialization
    and subcommand replies
  • src/platform/linux/uhid_backend.cpp: Switch Pro uinput routing

Expected behavior

When a host application assigns the virtual Switch Pro Controller's Player
LEDs, libvirtualhid should report the Nintendo Player LED state through its
platform-neutral output API so a streaming host can forward it.

Acceptance criteria

  • The public output model can represent Nintendo Player LED state without
    leaking platform-specific report details.
  • Switch Pro Set Player Lights output is parsed and delivered through the output
    callback on Windows.
  • The Linux backend exposes the output when the Switch Pro profile uses a route
    capable of receiving native HID output.
  • Existing Switch Pro rumble and subcommand replies do not regress.
  • Unit and backend integration tests cover Player LED output.
  • Streaming-host integration documentation describes the new output.

Metadata

Metadata

Labels

No labels
No labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions