fix(videoout): disable SDL DirectInput joystick enumeration on Windows #5580

Merged
oneandonlydean merged 2 commits from upstream-pr/5580 into main 2026-10-14 01:02:29 +00:00
oneandonlydean commented 2026-10-14 00:14:46 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-14T00:14:46Z.


What

On Windows, SDL's DirectInput joystick enumeration blocks forever on machines with some vendor HID devices, so SDL_InitSubSystem(VIDEO | GAMECONTROLLER) in the VideoOutDriver constructor never returns and sceVideoOutOpen hangs. The constructor now sets SDL_HINT_DIRECTINPUT_ENABLED to 0 at SDL_HINT_DEFAULT priority before that call, so the SDL_DIRECTINPUT_ENABLED environment variable still overrides it. XInput and HIDAPI controllers are still detected; controllers reachable only through DirectInput are not, recorded in the libSceVideoOut technical debt.

Relands #1050 by @Tenith01 (their commit is kept as is, with the technical debt entry added as a second commit crediting them as co-author).

Fixes #1042

Tested

  • Windows 11, RTX 4090, on the machine that reproduces #1042: the issue reporter confirmed that #1050 with the default environment makes sceVideoOutOpen return and guest_video_out_wqhd_detection pass, while the unpatched build hangs (https://github.com/boykopovar/AnyPS5/issues/1042#issuecomment-6093486423).
  • Linux, Release, BUILD_TESTING=ON: builds; the change is compiled only on Windows. tools/check_conventions.py --base origin/main passes.
  • Windows build: left to the full CI build.
  • Not tested with a DirectInput-only controller connected.

Checklist

  • Based on current main; no other open PR implements the same functions
  • 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
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Unblocks: none
  • GPUs tested: NVIDIA GeForce RTX 4090, Windows 11 (issue reporter, driver not reported); the change only sets an SDL input hint before window creation and does not touch rendering
  • AI-assisted: yes

Based on main feddf7f4c6.

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4851124533 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/5580). Originally posted by [oneandonlydean](https://github.com/oneandonlydean) on 2026-10-14T00:14:46Z. --- ### What On Windows, SDL's DirectInput joystick enumeration blocks forever on machines with some vendor HID devices, so `SDL_InitSubSystem(VIDEO | GAMECONTROLLER)` in the `VideoOutDriver` constructor never returns and `sceVideoOutOpen` hangs. The constructor now sets `SDL_HINT_DIRECTINPUT_ENABLED` to `0` at `SDL_HINT_DEFAULT` priority before that call, so the `SDL_DIRECTINPUT_ENABLED` environment variable still overrides it. XInput and HIDAPI controllers are still detected; controllers reachable only through DirectInput are not, recorded in the libSceVideoOut technical debt. Relands #1050 by @Tenith01 (their commit is kept as is, with the technical debt entry added as a second commit crediting them as co-author). Fixes #1042 ### Tested - Windows 11, RTX 4090, on the machine that reproduces #1042: the issue reporter confirmed that #1050 with the default environment makes `sceVideoOutOpen` return and `guest_video_out_wqhd_detection` pass, while the unpatched build hangs (https://github.com/boykopovar/AnyPS5/issues/1042#issuecomment-6093486423). - Linux, Release, `BUILD_TESTING=ON`: builds; the change is compiled only on Windows. `tools/check_conventions.py --base origin/main` passes. - Windows build: left to the full CI build. - Not tested with a DirectInput-only controller connected. ### Checklist - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed under Silent stubs in their library's [technical debt](https://github.com/boykopovar/AnyPS5/tree/main/docs/dev/debt) file - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] Unblocks: none - [x] GPUs tested: NVIDIA GeForce RTX 4090, Windows 11 (issue reporter, driver not reported); the change only sets an SDL input hint before window creation and does not touch rendering - [x] AI-assisted: yes Based on main feddf7f4c65.
github-actions[bot] commented 2026-10-14 00:24:58 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-14T00:24:58Z.


Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.

Pull request Conflicting files (lines on main) Same exports Same new files
#3664 core/libs/prx/libSceVideoOut/src/VideoOutDriver.cpp L261
#5239 docs/dev/debt/libSceVideoOut.md L25
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6158072308 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/5580#issuecomment-6158072308). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-14T00:24:58Z. --- <!-- pr-overlap --> Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in **Depends on**. | Pull request | Conflicting files (lines on `main`) | Same exports | Same new files | |---|---|---|---| | #3664 | `core/libs/prx/libSceVideoOut/src/VideoOutDriver.cpp` [L261](https://github.com/boykopovar/AnyPS5/blob/604ce71864f952cc8cf6fb1f4966cc905e0c1466/core/libs/prx/libSceVideoOut/src/VideoOutDriver.cpp#L261) | | | | #5239 | `docs/dev/debt/libSceVideoOut.md` [L25](https://github.com/boykopovar/AnyPS5/blob/604ce71864f952cc8cf6fb1f4966cc905e0c1466/docs/dev/debt/libSceVideoOut.md#L25) | | |
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!5580
No description provided.