Skip to content

feat(input): forward DS5 player/mic-LED from libvirtualhid to the client - #5537

Draft
joelfcscoelho wants to merge 1 commit into
LizardByte:masterfrom
joelfcscoelho:ds5-player-mic-led
Draft

feat(input): forward DS5 player/mic-LED from libvirtualhid to the client#5537
joelfcscoelho wants to merge 1 commit into
LizardByte:masterfrom
joelfcscoelho:ds5-player-mic-led

Conversation

@joelfcscoelho

Copy link
Copy Markdown

Description

Follow-up to LizardByte/libvirtualhid#97. Now that libvirtualhid reports
the DualSense player and mic LEDs, this forwards them on to the client so the physical
controller's LEDs follow what the game sets.

Adds two control messages, 0x5504 for the player LED and 0x5505 for the mic LED,
and wires the two new output kinds up to them.

  • common.h: set_player_led / set_mic_led feedback types and their make_* helpers
  • stream.cpp: the two packet types and their encode paths, same as the existing RGB
    LED one (0x5502)
  • virtualhid_input.cpp: forward the player_led / mic_led outputs, reusing the same
    per-value dedup as the RGB case
  • bumps the libvirtualhid submodule to pull in the above

One thing to note: this depends on the libvirtualhid PR, so CI won't pass until that's
merged (the submodule points at its branch). Leaving it a draft until then. Client-side
handling of the two messages is moonlight-common-c#137.

Type of Change

  • feat: New feature (non-breaking change which adds functionality)

Checklist

  • Code follows the style guidelines of this project
  • Code has been self-reviewed
  • Code has been commented, particularly in hard-to-understand areas
  • Code docstring/documentation-blocks for new or existing methods/components have been added or updated
  • Unit tests have been added or updated for any new or modified functionality

AI Usage

  • None: No AI tools were used in creating this PR
  • Light: AI provided minor assistance (formatting, simple suggestions)
  • Moderate: AI helped with code generation or debugging specific parts
  • Heavy: AI generated most or all of the code changes

@joelfcscoelho
joelfcscoelho marked this pull request as draft August 20, 2026 12:31
Route the new libvirtualhid player_led / mic_led output kinds to the client
via two control-stream messages (0x5504 player LED, 0x5505 mic LED), mirroring
the existing rgb_led passthrough with per-value dedup. Bumps the libvirtualhid
submodule to the commit that surfaces those output kinds.

Signed-off-by: Joel Coelho <joelfernandocscoelho@gmail.com>
@sonarqubecloud

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant