Explorar el Código

Don't enable enhanced report mode for Bluetooth Nintendo Switch controllers by default

This breaks applications using them in DirectInput mode, which isn't worth just getting battery status. We'll turn on enhanced mode if the application enables sensors.
Sam Lantinga hace 2 años
padre
commit
a87fa020ac
Se han modificado 1 ficheros con 3 adiciones y 0 borrados
  1. 3 0
      src/joystick/hidapi/SDL_hidapi_switch.c

+ 3 - 0
src/joystick/hidapi/SDL_hidapi_switch.c

@@ -762,7 +762,10 @@ static Uint8 GetDefaultInputMode(SDL_DriverSwitch_Context *ctx)
      * battery level over Bluetooth anyway.
      * battery level over Bluetooth anyway.
      */
      */
     if (ctx->device->vendor_id == USB_VENDOR_NINTENDO) {
     if (ctx->device->vendor_id == USB_VENDOR_NINTENDO) {
+        /* However, switching to full controller state breaks DirectInput, so let's not do that */
+        #if 0
         input_mode = k_eSwitchInputReportIDs_FullControllerState;
         input_mode = k_eSwitchInputReportIDs_FullControllerState;
+        #endif
     }
     }
     return input_mode;
     return input_mode;
 }
 }