Skip to content

fix(libSceVideoOut): disable legacy DirectInput enumeration on Windows - #1596

Closed
neuralsin wants to merge 1 commit into
boykopovar:mainfrom
neuralsin:fix/video-out-directinput-hint
Closed

neuralsin wants to merge 1 commit into
boykopovar:mainfrom
neuralsin:fix/video-out-directinput-hint

Conversation

@neuralsin

Copy link
Copy Markdown
Contributor

Summary

On Windows systems with composite or virtual vendor HID devices (such as Corsair iCUE devices, SteelSeries headsets/mice, NZXT controllers, or ITE RGB controllers), SDL's DirectInput joystick enumeration in sceVideoOutOpen can block indefinitely inside HidD_GetProductString during DirectInput8Create. Because every title opens video-out through sceVideoOutOpen, titles fail to progress beyond initialization on affected systems.

This sets SDL_HINT_DIRECTINPUT_ENABLED to "0" in VideoOutDriver and PadInput before initializing SDL_INIT_GAMECONTROLLER. Modern controllers (DualSense, DualShock 4, Xbox, and compatible pads) remain fully supported through SDL's XInput and HIDAPI backends without hanging on non-gamepad HID devices.

Closes #1042.

Checklist

  • Code passes python tools/check_conventions.py --base origin/main
  • Verified compilation and pad test suite pass cleanly (pad_sdl_tests, video_out_flip_tests)
  • Documentation updated in docs/user/INPUT_MAPPING.md

On Windows systems with composite or virtual vendor HID devices (such as Corsair iCUE, SteelSeries, or RGB controllers), SDL DirectInput joystick enumeration in sceVideoOutOpen can block indefinitely during HidD_GetProductString inside DirectInput8Create.

Set SDL_HINT_DIRECTINPUT_ENABLED to 0 in both VideoOutDriver and PadInput prior to initializing the game controller subsystem. Modern gamepads remain fully supported via XInput and HIDAPI without blocking on non-gamepad HID devices.

Closes boykopovar#1042.
@MarcZX10

MarcZX10 commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

I checked this against open PR #1050, which changes the same Windows DirectInput hint for issue #1042. Please coordinate with that author/maintainers so only one PR carries this fix; #1050 already uses SDL_SetHintWithPriority(..., SDL_HINT_DEFAULT), preserving the documented SDL_DIRECTINPUT_ENABLED environment override.

One code detail: the PadInput.cpp hint appears redundant in the current call path. VideoOutDriver initializes SDL_INIT_GAMECONTROLLER before PadInput::openFirstAvailableController is reached, so setting the hint in PadInput cannot affect that first initialization. If this PR is the one retained, please either remove that duplicate or show a call path where PadInput initializes the subsystem first. The docs addition is useful, but should state that DirectInput-only controllers may no longer be detected.

@oneandonlydean

Copy link
Copy Markdown
Collaborator

Closing: #1050 sets the same hint for #1042 and is waiting on a run on a machine that hangs. If you have such a machine, a result on #1050 would help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Windows: SDL DirectInput enumeration in sceVideoOutOpen blocks forever on a HID device, so video out never opens

3 participants