Skip to content

feat(macos): add gamepad support using libvirtualhid - #5807

Draft
ReenigneArcher wants to merge 2 commits into
masterfrom
feat/macos/gamepad-support
Draft

ReenigneArcher wants to merge 2 commits into
masterfrom
feat/macos/gamepad-support

Conversation

@ReenigneArcher

Copy link
Copy Markdown
Member

Description

Adds gamepad support to macOS using libvirtualhid.

TODO:

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

@codecov

codecov Bot commented Sep 26, 2026 •

Copy link
Copy Markdown

Bundle Report

Changes will increase total bundle size by 1.71kB (0.05%) ⬆️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
sunshine-esm 977.12kB 1.71kB (0.18%) ⬆️

Affected Assets, Files, and Routes:

view changes for bundle: sunshine-esm

Assets Changed:

Asset Name Size Change Total Size Change (%)
assets/index-*.js 1.15kB 395.87kB 0.29%
assets/Config-*.js -747 bytes 86.21kB -0.86%
assets/Home-*.js 506 bytes 53.95kB 0.95%
assets/Troubleshooting-*.js 805 bytes 32.95kB 2.5%

Files in assets/index-*.js:

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

Files in assets/Config-*.js:

  • ./src_assets/common/assets/web/configs/tabs/Inputs.vue → Total Size: 19.94kB

Files in assets/Home-*.js:

  • ./src_assets/common/assets/web/Home.vue → Total Size: 15.89kB

Files in assets/Troubleshooting-*.js:

  • ./src_assets/common/assets/web/Troubleshooting.vue → Total Size: 52.11kB

@codecov

codecov Bot commented Sep 26, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 84.94624% with 14 lines in your changes missing coverage. Please review.
✅ Project coverage is 38.60%. Comparing base (e1e6700) to head (d660a9d).
⚠️ Report is 1 commits behind head on master.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
src/system_tray.cpp 76.92% 6 Missing and 3 partials ⚠️
src/platform/windows/input.cpp 0.00% 2 Missing and 2 partials ⚠️
src/confighttp.cpp 0.00% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #5807      +/-   ##
==========================================
+ Coverage   38.36%   38.60%   +0.23%     
==========================================
  Files         113      116       +3     
  Lines       26099    26291     +192     
  Branches    11562    11650      +88     
==========================================
+ Hits        10014    10150     +136     
- Misses      14405    15249     +844     
+ Partials     1680      892     -788     
Flag Coverage Δ
Alpine-aarch64 23.05% <50.00%> (+0.04%) ⬆️
Alpine-x86_64 23.17% <50.00%> (+0.04%) ⬆️
Archlinux 21.82% <69.23%> (+0.04%) ⬆️
Homebrew-macos-15 38.20% <69.23%> (+0.45%) ⬆️
Homebrew-macos-26 38.52% <69.23%> (+0.44%) ⬆️
Homebrew-ubuntu-24.04 24.72% <55.55%> (+0.06%) ⬆️
Linux-AppImage-aarch64 0.00% <0.00%> (-25.86%) ⬇️
Linux-AppImage-x86_64 26.09% <55.55%> (+0.06%) ⬆️
PowerShell 100.00% <ø> (ø)
Web-UI 77.72% <100.00%> (-7.28%) ⬇️
Windows-AMD64 30.88% <55.17%> (+0.05%) ⬆️
Windows-ARM64 25.93% <52.63%> (+0.07%) ⬆️
macOS-arm64 31.58% <50.00%> (+0.28%) ⬆️
macOS-x86_64 32.19% <50.00%> (+0.28%) ⬆️

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

Files with missing lines Coverage Δ
src/config.cpp 61.38% <100.00%> (+0.58%) ⬆️
src/config.h 18.75% <ø> (ø)
src/input.cpp 47.86% <100.00%> (ø)
src/platform/macos/input.cpp 87.50% <100.00%> (+1.78%) ⬆️
src/platform/virtualhid_input.cpp 97.68% <100.00%> (+0.13%) ⬆️
src/platform/virtualhid_input.h 0.00% <ø> (ø)
...c_assets/common/assets/web/configs/tabs/Inputs.vue 67.82% <100.00%> (ø)
...ets/common/assets/web/public/assets/locale/en.json 100.00% <ø> (ø)
src/confighttp.cpp 58.85% <0.00%> (-0.10%) ⬇️
src/platform/windows/input.cpp 18.19% <0.00%> (+0.07%) ⬆️
... and 1 more

... and 36 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 e1e6700...d660a9d. Read the comment docs.

@github-actions

github-actions Bot commented Sep 26, 2026 •

Copy link
Copy Markdown
Last Updated 2026-09-26 23:46:55 UTC
Source Run CI Run #5803
Commit d660a9d322523f1597b7330a07340acff9ccf95e

Screenshot Comparison

PR #5807 screenshots vs screenshots baseline.

Matrix: AppImage-aarch64

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: AppImage-x86_64

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

Matrix: macOS-x86_64

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

@sonarqubecloud

Copy link
Copy Markdown

This branch has not been deployed

No deployments
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.

Sunshine: Gamepad support for macOS

1 participant