Skip to content

feat(streaming): add stream controls, input modes and screenshots - #346

Merged
ReenigneArcher merged 22 commits into
masterfrom
codex/stream-controls
Nov 17, 2026
Merged

ReenigneArcher merged 22 commits into
masterfrom
codex/stream-controls

Conversation

@ReenigneArcher

@ReenigneArcher ReenigneArcher commented Nov 17, 2026 •

Copy link
Copy Markdown
Member

Description

The stream quit shortcut now opens a dual-stick controls overlay, so players can use local input tools and captures without leaving their session.

  • Add eight wheel actions: keyboard, mouse mode, logs, Exit, Guide, Share, screenshot and statistics. Exit offers Cancel, Disconnect and Quit app; resumable apps show a pause marker and can also be quit from their app menu.
  • Add an Xbox One-style on-screen keyboard with letters, symbols, PC keys, common shortcuts, Caps, one-shot Shift and top/bottom docking. Keyboard navigation repeats while held, and helper glyphs follow the active input device.
  • Route up to four gamepads through stable, independent host slots. Support USB boot keyboards and three-button mice, release held host input around local overlays, pace stick-driven mouse movement, and recover menu gamepad input after stream/app shutdown or device removal.
  • Save clean host frames in the background with progress and timed completion/error popups. Add a Storage folder picker with directory creation, plus a per-server/app screenshot viewer with confirmed deletion.
  • Reuse menu layouts, label rasters and overlay storage to improve navigation and keep pending captures within the Xbox memory budget. Release capture conversion buffers before disk writes and bound the Xbox SDL audio wait so exiting during a save can finish cleanly.

Screenshot

Native SDL renders with a placeholder stream background:

Dual-stick stream controls

On-screen keyboard

Screenshot completion popup

Issues Fixed or Closed

Roadmap Issues

Testing

Local Windows builds and native tests used MSYS2 MinGW64.

  • ctest --test-dir cmake-build-release --output-on-failure: 464/464 passed. Coverage includes input capture/release, stable controller slots, keyboard repeat and OSK behavior, screenshot indexing/deletion, folder selection, authenticated host quit, gamepad handoff, popup lifetime/layout, overlay allocation reuse and cache correctness, and caller-owned UTC calendar conversion across epoch, leap-year and timestamp-range boundaries.
  • cmake --build cmake-build-release/xbox --target cxbe_convert -j4: passed; release ISO packaging passed.
  • cmake --build cmake-build-release --target docs: strict API documentation passed (561 HTML pages).
  • uv run --locked lb-update-clang-format, CMake lint for all changed CMake files, and git diff --check: passed.
  • Native SDL previews at 640×480 and 1280×720 passed; incremental wheel/OSK repaints matched full repaints pixel for pixel.
  • Live Sunshine/xemu controller tests exercised screenshot → reopen wheels → Exit → Disconnect at 10%, 30% and 80% saving progress. Pending captures finished, were indexed and reloaded after returning. GPU presentation and forced software presentation with streaming statistics were checked. The original exit-dialog allocation crash was reproduced before the fix; a forced missing audio hardware notification also verified bounded audio shutdown.

Physical-console performance and GPU image correctness remain unverified. Physical USB keyboards/mice and four simultaneous Sunshine virtual gamepads still need end-to-end hardware validation; their routing and slot behavior are covered by native tests. Hosted CI results are separate from these local checks.

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

OpenAI Codex assisted with implementation, debugging, regression tests, documentation and PR preparation.

@codecov

codecov Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 91.59193% with 150 lines in your changes missing coverage. Please review.
✅ Project coverage is 73.82%. Comparing base (06ff5f1) to head (1b56148).
⚠️ Report is 1 commits behind head on master.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
src/ui/shell_view.cpp 80.86% 4 Missing and 27 partials ⚠️
src/app/screenshot_library.cpp 85.56% 12 Missing and 16 partials ⚠️
src/app/client_state.cpp 89.38% 2 Missing and 24 partials ⚠️
src/streaming/video_overlay.cpp 94.50% 4 Missing and 17 partials ⚠️
src/input/stream_menu.cpp 91.08% 1 Missing and 13 partials ⚠️
src/platform/filesystem_utils.cpp 85.29% 3 Missing and 7 partials ⚠️
src/input/stream_input.cpp 94.73% 1 Missing and 8 partials ⚠️
src/network/host_pairing.cpp 80.00% 1 Missing and 4 partials ⚠️
src/input/usb_hid.cpp 93.75% 0 Missing and 4 partials ⚠️
src/app/screenshot_library.h 83.33% 0 Missing and 1 partial ⚠️
... and 1 more
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #346      +/-   ##
==========================================
+ Coverage   68.05%   73.82%   +5.77%     
==========================================
  Files          52       68      +16     
  Lines        6160     7897    +1737     
  Branches     2742     3452     +710     
==========================================
+ Hits         4192     5830    +1638     
- Misses        906     1090     +184     
+ Partials     1062      977      -85     
Flag Coverage Δ
Linux 73.06% <90.74%> (+5.70%) ⬆️
macOS 62.37% <83.77%> (+6.79%) ⬆️

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

Files with missing lines Coverage Δ
src/_nxdk_compat/include/moonlight_time.h 100.00% <100.00%> (ø)
src/app/client_state.h 98.59% <100.00%> (+0.37%) ⬆️
src/app/settings_storage.h 100.00% <100.00%> (ø)
src/input/navigation_input.cpp 100.00% <100.00%> (ø)
src/input/shell_controller.cpp 100.00% <100.00%> (ø)
src/input/stream_exit.cpp 100.00% <ø> (ø)
src/input/stream_exit.h 100.00% <ø> (ø)
src/input/stream_input.h 100.00% <100.00%> (ø)
src/input/stream_menu.h 100.00% <100.00%> (ø)
src/input/ui_input.cpp 100.00% <100.00%> (ø)
... and 24 more

... and 8 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 06ff5f1...1b56148. Read the comment docs.

@sonarqubecloud

Copy link
Copy Markdown

@ReenigneArcher
ReenigneArcher merged commit f7de3ee into master Nov 17, 2026
17 checks passed
@ReenigneArcher
ReenigneArcher deleted the codex/stream-controls branch November 17, 2026 13:46
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.

2 participants