Commit 5d50fa52df747ae9d8b2e893dc6309d931bd4ba5

Sam Lantinga 2022-08-03T19:39:36

Fixed timeout opening the Nintendo Joy-Con Charging Grip Sometimes opening the right Joy-Con takes a little longer for some reason

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/src/joystick/hidapi/SDL_hidapi_switch.c b/src/joystick/hidapi/SDL_hidapi_switch.c
index 4ff8eca..3a09e8c 100644
--- a/src/joystick/hidapi/SDL_hidapi_switch.c
+++ b/src/joystick/hidapi/SDL_hidapi_switch.c
@@ -624,7 +624,7 @@ WriteSubcommandSync(SDL_DriverSwitch_Context *ctx, ESwitchSubcommandIDs ucComman
 
 static SDL_bool WriteProprietary(SDL_DriverSwitch_Context *ctx, ESwitchProprietaryCommandIDs ucCommand, Uint8 *pBuf, Uint8 ucLen, SDL_bool waitForReply)
 {
-    int nRetries = 5;
+    int nRetries = 10;
 
     while (nRetries--) {
         SwitchProprietaryOutputPacket_t packet;