fix(videoout): honor an explicit SDL_VIDEODRIVER #8984

Closed
firasotoom85-droid wants to merge 1 commit from upstream-pr/8984 into main
firasotoom85-droid commented 2026-10-21 08:29:28 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by firasotoom85-droid on 2026-10-21T08:29:28Z.


What

VideoOutDriver sets SDL_HINT_VIDEODRIVER to wayland,x11 unconditionally on Linux. SDL_SetHint overrides the SDL_VIDEODRIVER environment variable, so a caller that needs X11 (for example, because its Wayland WSI cannot present correctly) cannot select it. The forced Wayland attempt can also load libdecor’s GTK plugin, which the host may not ship.

The change applies the existing wayland,x11 default only when SDL_VIDEODRIVER is unset or empty. Default behaviour is unchanged otherwise; an explicit driver now reaches SDL unchanged. The change is Linux-only.

The overlap bot lists PRs 674, 5021, 6879 and 7201 as sharing core/libs/prx/libSceVideoOut/src/VideoOutDriver.cpp; those comparisons could not complete because of base conflicts. None of them targets this unconditional hint; this PR is one topic.

Tested

The same conditional was built and run from the project’s pinned AnyPS5 revision (f219248f0) on a bare-metal console:

  • SDL_VIDEODRIVER=x11 reached SDL and sceVideoOutOpen used X11 rather than Wayland.
  • VideoOut self-test: 600 frames, 59.94 fps, p50 16.683 ms, p99 16.796 ms.
  • The console diagnostic passed 12/12; fmos-rally measured 59.5 fps.
  • No libdecor/GTK errors appeared.

This PR branch is rebased onto current main; the full AnyPS5 test suite was not run in the PR worktree. Windows and macOS were not tested; the change is Linux-only.

Checklist

  • Based on current main; no other open PR implements the same functions (the overlap bot lists shared-file PRs 674/5021/6879/7201, but none targets this override)
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file — not applicable, no new unimplemented paths
  • No notes, investigation .md files or images added to the repository
  • New third-party code is a submodule built from source — not applicable
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Fixes: none
  • Unblocks: none
  • GPUs tested: NVIDIA GeForce MX230, nvidia 580.178.04, Linux bare metal; X11/Xwayland
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4948684755 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8984). Originally posted by [firasotoom85-droid](https://github.com/firasotoom85-droid) on 2026-10-21T08:29:28Z. --- ### What `VideoOutDriver` sets `SDL_HINT_VIDEODRIVER` to `wayland,x11` unconditionally on Linux. `SDL_SetHint` overrides the `SDL_VIDEODRIVER` environment variable, so a caller that needs X11 (for example, because its Wayland WSI cannot present correctly) cannot select it. The forced Wayland attempt can also load libdecor’s GTK plugin, which the host may not ship. The change applies the existing `wayland,x11` default only when `SDL_VIDEODRIVER` is unset or empty. Default behaviour is unchanged otherwise; an explicit driver now reaches SDL unchanged. The change is Linux-only. The overlap bot lists PRs 674, 5021, 6879 and 7201 as sharing `core/libs/prx/libSceVideoOut/src/VideoOutDriver.cpp`; those comparisons could not complete because of base conflicts. None of them targets this unconditional hint; this PR is one topic. ### Tested The same conditional was built and run from the project’s pinned AnyPS5 revision (`f219248f0`) on a bare-metal console: - `SDL_VIDEODRIVER=x11` reached SDL and `sceVideoOutOpen` used X11 rather than Wayland. - VideoOut self-test: 600 frames, 59.94 fps, p50 16.683 ms, p99 16.796 ms. - The console diagnostic passed 12/12; `fmos-rally` measured 59.5 fps. - No libdecor/GTK errors appeared. This PR branch is rebased onto current `main`; the full AnyPS5 test suite was not run in the PR worktree. Windows and macOS were not tested; the change is Linux-only. ### Checklist - [x] Based on current `main`; no other open PR implements the same functions (the overlap bot lists shared-file PRs 674/5021/6879/7201, but none targets this override) - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except technical debt - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed under Silent stubs in their library's technical debt file — not applicable, no new unimplemented paths - [x] No notes, investigation `.md` files or images added to the repository - [x] New third-party code is a submodule built from source — not applicable - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] Fixes: none - [x] Unblocks: none - [x] GPUs tested: NVIDIA GeForce MX230, nvidia 580.178.04, Linux bare metal; X11/Xwayland - [x] AI-assisted: yes

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5!8984
No description provided.