Skip to content

build(xbox): migrate to SDL3 - #358

Merged
ReenigneArcher merged 6 commits into
masterfrom
codex/migrate-sdl3
Nov 20, 2026
Merged

ReenigneArcher merged 6 commits into
masterfrom
codex/migrate-sdl3

Conversation

@ReenigneArcher

@ReenigneArcher ReenigneArcher commented Nov 20, 2026 •

Copy link
Copy Markdown
Member

Description

Migrate the original Xbox client to pinned versions of nxdk-sdl3, SDL3_image, and SDL3_ttf. The shell uses the Xbox XGU renderer with a software fallback. Streaming keeps its software fallback and lets PVIDEO own pbkit during GPU playback. nxdk-sdl3

  • Port gamepad, USB keyboard and mouse, audio, window, and rendering code to SDL3. Apply Xbox driver adaptations to build-directory copies of the dependencies.
  • Prefer 32-bit XGU textures for poster art so gradients retain their detail.
  • Stage the launch card before releasing the shell renderer, keep its layout stable during startup, and hold it until the first GPU frame latches when the output mode stays the same.
  • Keep the CPU scanout address stable through display-mode changes and skip drawing the launch card during the switch to 1080i. This prevents the magenta tiling and cropped progress card observed in xemu. The live retest still showed about 0.7 seconds of black before the first 1080i frame.

Renovate will pick up the nxdk-sdl3 commit pin once the shared CPM matcher lands. LizardByte/.github #1012

Screenshot

Issues Fixed or Closed

Roadmap Issues

Testing

  • Built the Xbox release ISO and strict documentation target with MSYS2 MinGW64.
  • Ran ctest --test-dir cmake-build-release --output-on-failure. All 499 tests passed. Regression tests cover SDL3 controller ownership and keyboard modifiers, fixed launch-card layout, and first-frame GPU scanout ordering and timeout.
  • Ran the repository C++ formatter and CMake lint with the CI settings.
  • Compared poster gradients in xemu. Reproduced the corrupted transition in xemu 0.8.139 against a live Sunshine Desktop stream and verified the revised 1080i GPU handoff in the same window. Software streaming smoke tests passed at 720p and 1080i against the same Sunshine host.
  • Physical Xbox output remains untested.

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

Codex assisted with implementation, regression tests, live xemu validation, and the pull request description.

@codecov

codecov Bot commented Nov 20, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 98.14815% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 74.36%. Comparing base (2c34490) to head (deb85f0).
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
src/ui/shell_layout.cpp 95.83% 0 Missing and 1 partial ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #358      +/-   ##
==========================================
+ Coverage   73.53%   74.36%   +0.83%     
==========================================
  Files          52       71      +19     
  Lines        7671     8185     +514     
  Branches     3281     3539     +258     
==========================================
+ Hits         5641     6087     +446     
+ Misses       1129     1096      -33     
- Partials      901     1002     +101     
Flag Coverage Δ
Linux 73.60% <97.87%> (+0.06%) ⬆️
macOS 62.93% <79.24%> (?)

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

Files with missing lines Coverage Δ
src/input/shell_controller.cpp 100.00% <100.00%> (ø)
src/input/stream_input.cpp 94.73% <100.00%> (+0.03%) ⬆️
src/input/stream_input.h 100.00% <100.00%> (ø)
src/input/stream_menu.cpp 91.08% <100.00%> (+2.05%) ⬆️
src/input/stream_menu.h 100.00% <100.00%> (ø)
src/streaming/pvideo_presenter.cpp 76.04% <100.00%> (+2.13%) ⬆️
src/streaming/pvideo_presenter.h 100.00% <100.00%> (ø)
src/streaming/video_overlay.h 100.00% <ø> (ø)
src/ui/shell_layout.cpp 97.74% <95.83%> (-0.32%) ⬇️

... and 45 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 2c34490...deb85f0. Read the comment docs.

@sonarqubecloud

Copy link
Copy Markdown

@ReenigneArcher
ReenigneArcher merged commit 84791d1 into master Nov 20, 2026
17 checks passed
@ReenigneArcher
ReenigneArcher deleted the codex/migrate-sdl3 branch November 20, 2026 13:41
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