mirror of
https://github.com/Ryujinx/SDL.git
synced 2024-12-23 07:35:38 +00:00
Revert "Check to make sure the Windows joystick device has buttons and axes"
This reverts commit 642504bc5993a6acd4d9c1d4c1314c6b1cf6e4e1. We have SDL_HINT_JOYSTICK_ROG_CHAKRAM to ignore or allow the ROG Chakram X mouse to be used as a joystick. Fixes https://github.com/libsdl-org/SDL/issues/8227 (cherry picked from commit e5a15f94e2f1a8fbbffb25ea9932cda9679a68fd)
This commit is contained in:
parent
44d8721087
commit
e3e41b69a1
|
@ -453,7 +453,6 @@ static BOOL CALLBACK EnumJoystickDetectCallback(LPCDIDEVICEINSTANCE pDeviceInsta
|
|||
char *hidPath = NULL;
|
||||
char *name = NULL;
|
||||
LPDIRECTINPUTDEVICE8 device = NULL;
|
||||
DIDEVCAPS caps;
|
||||
|
||||
/* We are only supporting HID devices. */
|
||||
CHECK(pDeviceInstance->dwDevType & DIDEVTYPE_HID);
|
||||
|
@ -463,13 +462,6 @@ static BOOL CALLBACK EnumJoystickDetectCallback(LPCDIDEVICEINSTANCE pDeviceInsta
|
|||
CHECK(QueryDevicePath(device, &hidPath));
|
||||
CHECK(QueryDeviceInfo(device, &vendor, &product));
|
||||
|
||||
/* Check to make sure the device has buttons and axes.
|
||||
* This fixes incorrectly detecting the ROG CHAKRAM X mouse as a game controller on Windows 10
|
||||
*/
|
||||
caps.dwSize = sizeof(caps);
|
||||
CHECK(SUCCEEDED(IDirectInputDevice8_GetCapabilities(device, &caps)));
|
||||
CHECK(caps.dwAxes > 0 && caps.dwButtons > 0);
|
||||
|
||||
CHECK(!SDL_IsXInputDevice(vendor, product, hidPath));
|
||||
|
||||
pNewJoystick = *(JoyStick_DeviceData **)pContext;
|
||||
|
|
Loading…
Reference in a new issue