Browse Source

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 5 months ago
parent
commit
eb89d0c8c3
1 changed files with 6 additions and 0 deletions
  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;
         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;
     return input_mode;
 }
 }