Skip to content

feat: libvirtualhid updates - #5563

Draft
ReenigneArcher wants to merge 2 commits into
masterfrom
feat/libvirtualhid-updates
Draft

feat: libvirtualhid updates#5563
ReenigneArcher wants to merge 2 commits into
masterfrom
feat/libvirtualhid-updates

Conversation

@ReenigneArcher

Copy link
Copy Markdown
Member

Description

  • Adds HID backed keyboard on Windows
  • Switch Pro improvements

TODO:

  • update min Virtual HID Driver version after next release

Screenshot

Issues Fixed or Closed

Roadmap Issues

Type of Change

  • feat: New feature (non-breaking change which adds functionality)
  • fix: Bug fix (non-breaking change which fixes an issue)
  • docs: Documentation only changes
  • style: Changes that do not affect the meaning of the code (white-space, formatting, missing semicolons, etc.)
  • refactor: Code change that neither fixes a bug nor adds a feature
  • perf: Code change that improves performance
  • test: Adding missing tests or correcting existing tests
  • build: Changes that affect the build system or external dependencies
  • ci: Changes to CI configuration files and scripts
  • chore: Other changes that don't modify src or test files
  • revert: Reverts a previous commit
  • BREAKING CHANGE: Introduces a breaking change (can be combined with any type above)

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

See our AI usage policy.

  • 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

Renamed the license-state refresh flow from mouse-only to shared virtual input so Sunshine now recreates both libvirtualhid keyboard and mouse devices, including resetting keyboard/mouse state before refresh. Added explicit keyboard refresh support in the virtualhid input context and wired config HTTP license updates to trigger the full refresh.

Updated Windows-facing messaging and docs to describe Raw Input keyboard + mouse support, added troubleshooting guidance for keyboard detection, and adjusted tray/UI localization strings accordingly. Also bumped the minimum supported Virtual HID Driver version to 2026.826.2024.22, updated related unit tests, and advanced the libvirtualhid submodule.
@codecov

codecov Bot commented Aug 27, 2026

Copy link
Copy Markdown

Bundle Report

Changes will increase total bundle size by 91 bytes (0.0%) ⬆️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
sunshine-esm 880.42kB 91 bytes (0.01%) ⬆️

Affected Assets, Files, and Routes:

view changes for bundle: sunshine-esm

Assets Changed:

Asset Name Size Change Total Size Change (%)
assets/logo-*.js 91 bytes 385.36kB 0.02%

Files in assets/logo-*.js:

  • ./src_assets/common/assets/web/public/assets/locale/en.json → Total Size: 46.93kB

@codecov

codecov Bot commented Aug 28, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 81.53846% with 12 lines in your changes missing coverage. Please review.
✅ Project coverage is 33.84%. Comparing base (377e07c) to head (91434da).
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
src/stream.cpp 16.66% 9 Missing and 1 partial ⚠️
src/confighttp.cpp 0.00% 1 Missing ⚠️
src/platform/virtualhid_input.cpp 97.36% 0 Missing and 1 partial ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #5563      +/-   ##
==========================================
+ Coverage   33.65%   33.84%   +0.18%     
==========================================
  Files         104      104              
  Lines       25125    25183      +58     
  Branches    11118    11141      +23     
==========================================
+ Hits         8457     8522      +65     
- Misses      13824    14586     +762     
+ Partials     2844     2075     -769     
Flag Coverage Δ
Archlinux 0.00% <0.00%> (ø)
FreeBSD-amd64 19.65% <63.33%> (+0.18%) ⬆️
Homebrew-macos-14 30.97% <70.90%> (+0.20%) ⬆️
Homebrew-macos-15 31.67% <70.90%> (+0.20%) ⬆️
Homebrew-macos-26 31.77% <70.90%> (+0.18%) ⬆️
Homebrew-ubuntu-24.04 20.90% <63.26%> (+0.12%) ⬆️
Linux-AppImage 20.31% <63.26%> (?)
Windows-AMD64 25.92% <63.63%> (+0.13%) ⬆️
Windows-ARM64 21.84% <56.36%> (+0.18%) ⬆️
macOS-arm64 25.86% <63.33%> (+0.28%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
src/input.cpp 31.18% <100.00%> (+0.50%) ⬆️
src/input.h 50.00% <ø> (ø)
src/platform/common.h 60.44% <100.00%> (+1.85%) ⬆️
src/platform/virtualhid_input.h 0.00% <ø> (ø)
src/system_tray.cpp 80.51% <100.00%> (+0.23%) ⬆️
src/confighttp.cpp 54.33% <0.00%> (ø)
src/platform/virtualhid_input.cpp 97.72% <97.36%> (+0.22%) ⬆️
src/stream.cpp 21.68% <16.66%> (-0.06%) ⬇️

... and 35 files with indirect coverage changes


Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 377e07c...91434da. Read the comment docs.

@github-actions

github-actions Bot commented Aug 28, 2026

Copy link
Copy Markdown
Last Updated 2026-08-28 02:03:46 UTC
Source Run CI Run #5138
Commit 91434daefdf0b32943a3ee2c808bd9ee9e49186b

Screenshot Comparison

PR #5563 screenshots vs screenshots baseline.

Matrix: AppImage

Image Baseline PR
sunshine_tray_initial.png
sunshine_tray_menu.png
sunshine_tray_pairing_request.png
sunshine_tray_paused.png
sunshine_tray_stopped.png
sunshine_tray_streaming.png
sunshine_tray_tooltip.png

Matrix: Windows-AMD64

Image Baseline PR
sunshine_tray_initial.png
sunshine_tray_menu.png
sunshine_tray_pairing_request.png
sunshine_tray_paused.png
sunshine_tray_stopped.png
sunshine_tray_streaming.png
sunshine_tray_tooltip.png

Matrix: Windows-ARM64

Image Baseline PR
sunshine_tray_initial.png
sunshine_tray_menu.png
sunshine_tray_pairing_request.png
sunshine_tray_paused.png
sunshine_tray_stopped.png
sunshine_tray_streaming.png
sunshine_tray_tooltip.png

Matrix: macOS-arm64

Image Baseline PR
sunshine_tray_initial.png
sunshine_tray_menu.png
sunshine_tray_pairing_request.png
sunshine_tray_paused.png
sunshine_tray_stopped.png
sunshine_tray_streaming.png
sunshine_tray_tooltip.png

Introduces a new `set_player_leds` gamepad feedback message and wires it through virtualhid and control-stream encoding. Player LED output is converted to solid/flashing bitmasks, deduplicated like other feedback signals, reset on reconnect, and sent with a new Sunshine extension packet type (`0x5504`). Unit tests were expanded to verify routing and deduplication behavior for player LED updates, and the libvirtualhid submodule was bumped to a version that provides player LED output events.
@ReenigneArcher
ReenigneArcher force-pushed the feat/libvirtualhid-updates branch from 596fbf9 to 91434da Compare August 28, 2026 01:16
@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