From 5d50fa52df747ae9d8b2e893dc6309d931bd4ba5 Mon Sep 17 00:00:00 2001
From: Sam Lantinga <[EMAIL REDACTED]>
Date: Wed, 3 Aug 2022 19:39:36 -0700
Subject: [PATCH] Fixed timeout opening the Nintendo Joy-Con Charging Grip
Sometimes opening the right Joy-Con takes a little longer for some reason
---
src/joystick/hidapi/SDL_hidapi_switch.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/joystick/hidapi/SDL_hidapi_switch.c b/src/joystick/hidapi/SDL_hidapi_switch.c
index 4ff8ecaeb66..3a09e8c32e6 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;