History

windows joystick fix

Spencer Salazars committed 3 years ago

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

Showing the changes to src/core/util_hid.cpp (1 of 1 file). Show all

Unified · Split

src/core/util_hid.cpp+5−1
@@ -5017,7 +5017,11 @@ void Joystick_init() · 5016 unmodified lines
50175017 #if DIRECTINPUT_VERSION <= 0x700 // REFACTOR-2017
50185018 if( lpdi->EnumDevices( DIDEVTYPE_JOYSTICK, DIEnumJoystickProc,
50195019 #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,
50215025 #endif
50225026 NULL, DIEDFL_ATTACHEDONLY ) != DI_OK )
50235027 {

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