Procházet zdrojové kódy

Revert "Check to make sure the Windows joystick device has buttons and axes"

This reverts commit ad0af488837e44cbea0f0eab3b2f73b50a74bff4.

It turns out the ROG PUGIO II actually enumerates as a gamepad, so this change didn't have any effect anyway. We're getting lots of reports of people's racing pedals and similar devices no longer showing up, so we'll revert this again.

Fixes https://github.com/libsdl-org/SDL/issues/8227
Fixes https://github.com/libsdl-org/SDL/issues/8484

(cherry picked from commit 2c1fbe1967457c6b95323a5ea4136849c66bc307)
Sam Lantinga před 1 rokem
rodič
revize
cc20d0147e
1 změnil soubory, kde provedl 0 přidání a 8 odebrání
  1. 0 8
      src/joystick/windows/SDL_dinputjoystick.c

+ 0 - 8
src/joystick/windows/SDL_dinputjoystick.c

@@ -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;