Unified · Split
| @@ -5017,7 +5017,11 @@ void Joystick_init() · 5016 unmodified lines | ||
| 5017 | 5017 | #if DIRECTINPUT_VERSION <= 0x700 // REFACTOR-2017 |
| 5018 | 5018 | if( lpdi->EnumDevices( DIDEVTYPE_JOYSTICK, DIEnumJoystickProc, |
| 5019 | 5019 | #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 | 5025 | #endif |
| 5022 | 5026 | NULL, DIEDFL_ATTACHEDONLY ) != DI_OK ) |
| 5023 | 5027 | { |