History

windows joystick fix

Spencer Salazars committed 3 years ago

Commit 9ad68ff1 parent d7567901 file · +5 −1Browse files

Unified · Split

src/core/util_hid.cpp+5−1
@@ -5017,7 +5017,11 @@ void Joystick_init() · 5016 unmodified lines
5017#if DIRECTINPUT_VERSION <= 0x700 // REFACTOR-20175017#if DIRECTINPUT_VERSION <= 0x700 // REFACTOR-2017
5018 if( lpdi->EnumDevices( DIDEVTYPE_JOYSTICK, DIEnumJoystickProc,5018 if( lpdi->EnumDevices( DIDEVTYPE_JOYSTICK, DIEnumJoystickProc,
5019#else5019#else
5020 if( lpdi->EnumDevices( DI8DEVTYPE_JOYSTICK, DIEnumJoystickProc,5020 // fix 1.5.0.1 (Spencer 2023): use DI8DEVCLASS_GAMECTRL instead of DI8DEVTYPE_JOYSTICK
5021 // cf. EnumDevices documentation
5022 // this seems to fix joystick usage in general, but Xbox One controller still fails
5023 //if (lpdi->EnumDevices(DI8DEVTYPE_JOYSTICK, DIEnumJoystickProc,
5024 if( lpdi->EnumDevices( DI8DEVCLASS_GAMECTRL, DIEnumJoystickProc,
5021#endif5025#endif
5022 NULL, DIEDFL_ATTACHEDONLY ) != DI_OK )5026 NULL, DIEDFL_ATTACHEDONLY ) != DI_OK )
5023 {5027 {

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t