Skip to content

fix(input): restore stream quit and menu controller handoff - #339

Draft
ReenigneArcher wants to merge 4 commits into
masterfrom
codex/fix-stream-controller-handoff
Draft

ReenigneArcher wants to merge 4 commits into
masterfrom
codex/fix-stream-controller-handoff

Conversation

@ReenigneArcher

Copy link
Copy Markdown
Member

Description

Quitting a stream can watch an idle gamepad when the same machine supplies both the physical controller and Sunshine's virtual controller. Closing controller references while switching between the shell, stream, and summary can also leave menu input unresponsive.

  • Quit immediately with Back/Select + Black + White (LB + RB) on any connected controller, using digital buttons and no hold timer.
  • Read SDL devices on the event thread, preserve queued button transitions per device, and publish synchronized snapshots to the gameplay input sender.
  • Retain controller references across render-resource transitions and hand the controller used to dismiss the summary back to the shell.
  • Show Stopping stream... promptly and add opt-in controller diagnostics, disabled by default.

This is a draft follow-up to #194 and retains its three commits. Merge only after moonlight-common-c #175 and #194. The base is master; the controller-only diff excludes the prerequisite codec work.

Screenshot

Issues Fixed or Closed

Roadmap Issues

Testing

  • Windows MSYS2 MinGW64: controller-only host/Xbox build and XBE/ISO packaging passed with cmake --build cmake-build-release -j 6.
  • ctest --test-dir cmake-build-release --output-on-failure: 267/267 passed, including five new exit-chord regressions covering missing buttons, connection state, press ordering, queued releases, and disconnect cleanup.
  • Strict Dockle/Doxygen api build passed (397 HTML pages).
  • Shared clang-format run and git diff --check passed.
  • During implementation, the user confirmed in xemu with a wired Xbox One controller that quitting, summary dismissal, menu navigation, and starting another stream work. The isolated controller split was rebuilt here; that interactive check was not repeated on the split ISO.

Real Xbox hardware was not tested. Hosted CI has not been verified for this draft.

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
  • Tests have been added or updated for new or modified functionality, including regression tests for bug fixes

AI Usage

See our AI usage policy.

  • AI tools were used while preparing this PR

Introduce a VideoDecoderSelection setting and UI to cycle/choose preferred decoder (Auto, H.264, MPEG-2, H.263+). Persist and parse the new streaming.video_decoder setting, include it in settings initialization/persistence, and expose the choice in the settings UI and status messages. Advertise supported Moonlight video formats based on the preference and pass that to the session startup; update the FFmpeg backend to select and log the appropriate decoder (mpeg2/h263/h264), improve error messages, and expose the active decoder name to stats/overlays. Enable required FFmpeg parsers/decoders and update the ffmpeg profile signature; add/update unit tests and bump the moonlight-common-c submodule.
@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