فهرست منبع

Don't put wired Switch Pro controllers into simple report mode

This stops the controller from sending input or responding to queries until it's unplugged.
Sam Lantinga 1 ماه پیش
والد
کامیت
eb89d0c8c3
1فایلهای تغییر یافته به همراه6 افزوده شده و 0 حذف شده
  1. 6 0
      src/joystick/hidapi/SDL_hidapi_switch.c

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

@@ -813,6 +813,12 @@ static Uint8 GetDefaultInputMode(SDL_DriverSwitch_Context *ctx)
         }
         break;
     }
+
+    // Wired controllers break if they are put into simple controller state
+    if (input_mode == k_eSwitchInputReportIDs_SimpleControllerState &&
+        !ctx->device->is_bluetooth) {
+        input_mode = k_eSwitchInputReportIDs_FullControllerState;
+    }
     return input_mode;
 }