mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-10-01 23:48:29 +00:00
Simplify and cleanup DirectInput joystick backend code:
- Do not call IDirectInputDevice8_QueryInterface(device, &IID_IDirectInputDevice8,...) on DIRECTINPUTDEVICE8 device - Get joystick VendorID and ProductID via IDirectInputDevice8_GetProperty(.., DIPROP_VIDPID, ..) call instead of messing with DIDEVICEINSTANCE.guidProduct - Normalize HID device interface path to upper case for stable operation of XInput check - Remove useless RawInput calls in SDL_IsXInputDevice() - just check for "IG_" string in HID device interface path that we already have There shouldn't be any observable behavior changes.
This commit is contained in:

committed by
Sam Lantinga

parent
f2f759dca3
commit
73dc68a7ae
@@ -37,7 +37,7 @@ typedef struct JoyStick_DeviceData
|
||||
BYTE SubType;
|
||||
Uint8 XInputUserId;
|
||||
DIDEVICEINSTANCE dxdevice;
|
||||
WCHAR hidPath[MAX_PATH];
|
||||
char hidPath[MAX_PATH];
|
||||
struct JoyStick_DeviceData *pNext;
|
||||
} JoyStick_DeviceData;
|
||||
|
||||
|
Reference in New Issue
Block a user