Răsfoiți Sursa

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 an în urmă
părinte
comite
eb89d0c8c3
1 a modificat fișierele cu 6 adăugiri și 0 ștergeri
  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;
 }