fix(libSceVideoOut): add APS5_NO_WGI to turn off SDL's Windows.Gaming.Input backend #7005
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/7005"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by TheSovietWaffle on 2026-10-17T04:07:22Z.
What
On Windows,
VideoOutDriverkeeps SDL's Windows.Gaming.Input joystick backend on by default. WhenAPS5_NO_WGIis set, it setsSDL_HINT_JOYSTICK_WGIto0atSDL_HINT_DEFAULTpriority beforeSDL_InitSubSystem, next to the existingSDL_HINT_DIRECTINPUT_ENABLEDline, following the otherAPS5_NO_*switches. The Windows game controllers entry indocs/dev/debt/libSceVideoOut.mddescribes the opt-out: what it fixes, what it drops (racing wheels, arcade and flight sticks, HID pads without an HIDAPI driver, Xbox One/Series trigger rumble) and the host where the fault was seen.On that Windows 10 host the WGI backend faults a few seconds into every run, in every title I ran:
[rsi]holds the tail of SDL'sSDL_JOYSTICK_ARCADESTICK_DEVICES_EXCLUDEDhint name. Device Manager on this host listsNefarius Virtual Gamepad Emulation Bus(OK) andOculus Virtual Gamepad Emulation Bus(Error); I have not established which, if either, triggers the fault.Tested
Windows 10 Pro 22H2 (19045), Ryzen 7 7800X3D, RTX 3080 (NVIDIA 617.42), WinLibs GCC 15.2.0 r7, Release.
Windows.Gaming.Input.dll+0x10a84mainAPS5_NO_WGI=1pad_input,pad_input_mapping,pad_keyboard_mouse,pad_sdl,guest_padandguest_pad_vibration_modepass on this head.XInput Controller #1; @screamm's RTX 4070 / Windows 11 cross-check and @cadenasynyster's DualSense over Bluetooth check are in the comments.tools/check_conventions.py --base origin/mainpasses.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)APS5_NO_WGI; no bring-up discussion)🤖 Generated with Claude Code
Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-17T04:15:47Z.
Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.
core/libs/prx/libSceVideoOut/src/VideoOutDriver.cppdocs/dev/debt/libSceVideoOut.mdcore/libs/prx/libSceVideoOut/src/VideoOutDriver.cppcore/libs/prx/libSceVideoOut/src/VideoOutDriver.cppdocs/dev/debt/libSceVideoOut.mdcore/libs/prx/libSceVideoOut/src/VideoOutDriver.cppcore/libs/prx/libSceVideoOut/src/VideoOutDriver.cppdocs/dev/debt/libSceVideoOut.mdImported from boykopovar/AnyPS5. Originally posted by screamm on 2026-10-17T10:05:47Z.
Cross-validation on Windows 11 Pro 26220, NVIDIA RTX 4070 (596.21), MinGW GCC 15.2, PR head
9c5920b9f, built together with #6956 (disjoint files) on main5f61879a9(clean merge). Before-runs used a build of3b10c7ef0; the SDL/VideoOut/Pthread/Time sources are identical between the two.libs: pass.pad_input,guest_pad,guest_pad_vibration_mode,pad_sdl,pad_input_mapping,pad_keyboard_mouse,--repeat until-fail:3: 3 of 3 pass each (run twice, once on a busy host).main,Windows.Gaming.Input.dllis loaded 22 s and 33 s into the two runs with a complete sample (two earlier runs: by 20 s and by 50 s), together withxinput1_4.dll. With this PR it is never loaded in the two complete runs (62 s and 57 s;xinput1_4.dllis loaded at 27 s and 32 s), and withSDL_JOYSTICK_WGI=1set on the PR build it is loaded again (26.6 s). So the hint takes effect and the environment variable turns it back on, as the description says.Windows.Gaming.Input.dll+0x10a84) does not occur on my host with or without the PR (no virtual gamepad buses here), so I cannot confirm the 26/26 -> 0 result, only that the title runs normally with WGI off.XInputGetState0-3 all "not connected"), so I could not check that a pad still opens and reads through XInput; that rests on your Xbox 360 check.ctest -j8 --timeout 120 -E '^agc_driver_|^video_out_flip': 855 of 877 pass, 2 skipped, 20 timeouts on a host with other builds running; all 20 pass on serial reruns (conventions/tooling tests and four libkernel tests), none touches this line.tools/check_conventions.py --base origin/mainandgit diff --check: pass.Suggestion:
docs/dev/debt/libSceVideoOut.md("Windows game controllers") already lists the DirectInput disable and itsSDL_DIRECTINPUT_ENABLED=1override; the WGI disable has the same trade-off (devices reachable only through WGI, such as Xbox One/Series trigger rumble, are not used) and could be added there withSDL_JOYSTICK_WGI=1.Not checked: pad input over XInput on a physical pad, Windows 10, Linux/macOS (the line is Windows-only).
Written with Claude Code assistance (validation by a subagent, reviewed in this session).
Imported from boykopovar/AnyPS5. Originally posted by cadenasynyster on 2026-10-17T19:44:07Z.
DualSense check, since the PR was tested only with a wired Xbox 360 controller:
Windows 11 10.0.26200.9711, RTX 5070 Ti (NVIDIA 617.42), WinLibs GCC 15.2.0 r7, Release. DualSense over Bluetooth, no Steam/DS4Windows running. Head
c2f466de5merged onto mainf3263dfbf(clean merge, no new build errors).Controller detection, from
video_out_flip_testswith a real window, same run on both:So with WGI off, the Bluetooth DualSense is still opened as a game controller with motion sensors, touchpad and LED, as the commit message expects. guest_pad, guest_pad_vibration_mode and pad_sdl pass with the PR.
Not checked: button and stick input in a title, rumble, a wired DualSense, and the WGI crash itself (this host doesn't reproduce it on main).
AI-assisted: yes
Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-17T21:40:31Z.
@TheSovietWaffle thanks for the careful crash data, and for the cross-checks from others.
We'd rather not turn Windows.Gaming.Input off for everyone. With it off, Windows loses devices and features only WGI reaches once DirectInput is off: racing wheels, arcade and flight sticks, HID pads with no HIDAPI driver, and Xbox One/Series trigger rumble. Wheels matter for a lot of PS5 titles.
Could you flip it around so WGI stays on by default and an environment variable turns it off for hosts that hit the
Windows.Gaming.Input.dll+0x10a84fault? Please name it in our existingAPS5_*style, for exampleAPS5_NO_WGI, following theAPS5_NO_*switches, and only setSDL_HINT_JOYSTICK_WGIto0inVideoOutDriverwhen it's set.Then please update the Windows game controllers entry in
docs/dev/debt/libSceVideoOut.mdto describe the opt-out: what it fixes, what it drops (name wheels, arcade sticks and flight sticks there), and the host setup where you saw the fault.Imported from boykopovar/AnyPS5. Originally posted by TheSovietWaffle on 2026-10-19T18:23:47Z.
@oneandonlydean done in
a55dc4c53: Windows.Gaming.Input stays on by default, andSDL_HINT_JOYSTICK_WGIis set to0only whenAPS5_NO_WGIis set. The Windows game controllers debt entry now describes the opt-out, what it drops (racing wheels, arcade and flight sticks, HID pads without an HIDAPI driver, Xbox One/Series trigger rumble) and the host where I saw the fault. On that host EVO Player faults 3 of 3 runs by default and 0 of 3 withAPS5_NO_WGI=1; the pad tests pass. Title and description are updated to match.AI-assisted: yes (Claude Code).