Repository navigation
feat(input): configure a held Guide button combination - #6188
Open
MaomaoADHD wants to merge 1 commit into
Open
MaomaoADHD wants to merge 1 commit into
MaomaoADHD wants to merge 1 commit into
Conversation
Author
|
|
This branch has not been deployed
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
Some controllers expose ordinary buttons to Moonlight but do not deliver a usable Home/Guide button to the host. On my 8BitDo Ultimate 2C Wireless over Bluetooth, Home is not forwarded as Xbox Guide; holding it powers off the controller. Sunshine receives the other gamepad inputs normally through Moonlight and ViGEmBus with Xbox 360 emulation.
Sunshine already offers
back_button_timeout, but its long-Back path emits a roughly 100 ms Guide press. That cannot serve interactions that need Guide to stay down, such as Guide plus stick mouse control in Steam. Back/Select also cannot be assigned to R4 in my controller setup. Remapping the physical Home button is not a workable solution because it powers off the controller.This PR adds the opt-in
guide_button_combosetting. The Inputs tab lets users select any combination of at least two buttons from A, B, X, Y, L1, L2, R1, and R2. The setting is disabled by default. While all selected buttons remain pressed, Sunshine sends a continuously held Home/Guide state and suppresses the selected buttons. Releasing any selected button immediately releases Guide and restores normal button behavior. Other controls, including the D-pad and sticks, continue to pass through. L2/R2 count as pressed at half travel. The existing Back/Select timeout remains independent; users can set it to-1if they do not want its separate long-press shortcut.My tested controller layout uses L4 for Moonlight's Start+Select+L1+R1 quit-session combination and R4 for X+Y+L1+R1. With
guide_button_combo = x+y+l1+r1, R4 produces a real, held Guide button for Steam, while L4 exits Moonlight. These are my mappings, not defaults imposed on other users. They let the Ultimate 2C Wireless remain usable without its physical Home button.The implementation reuses the existing Home flag, which the Windows Xbox 360 backend maps to
XUSB_GAMEPAD_GUIDE. It adds no new driver or dependency. The configuration parser rejects unknown, duplicate, and single-button combinations; the UI warns when only one button is selected.Screenshot
The Inputs tab adds eight labeled checkboxes directly below the Back/Select timeout. The Vue test covers selection, serialization, clearing, and the disabled-gamepad state.
Issues Fixed or Closed
Roadmap Issues
Testing
cmake --build ... --target sunshine test_sunshinepassed.test_sunshine --gtest_filter=InputGamepadSessionTest.*:ConfigParsingTest.*:ConfigPersistenceTest.*: 29 passed. New tests cover disabled default, continuous Guide hold, partial release, D-pad passthrough, L2/R2 thresholds, parsing, and configuration application.npm run buildpassed.npm test: 220 passed after temporarily normalizingdocs/configuration.mdto LF; the file was restored byte-for-byte afterward. On this Windows checkout, one unrelated existing documentation test searches for LF afterexternal_audioand fails with CRLF.RtspResponseTest.CommonDispatcherPreservesResponsesWithoutServerContext, unrelated to this change, so it was stopped. The 29 input and configuration tests above passed separately.Type of Change
Checklist
AI Usage
See our AI usage policy.
Codex helped inspect Sunshine and Moonlight code, implement the configuration and UI, and run the tests. The controller behavior and successful prototype test were reported by the user.