From da50f1bd3eb65adcc1fc673346d0c9b74f055543 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Tue, 9 Aug 2022 14:05:43 -0700 Subject: [PATCH] Bluetooth devices can recover from over a second of dropped reports --- 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 0779e9b530..373d20e439 100644 --- a/src/joystick/hidapi/SDL_hidapi_switch.c +++ b/src/joystick/hidapi/SDL_hidapi_switch.c @@ -2057,7 +2057,7 @@ HIDAPI_DriverSwitch_UpdateDevice(SDL_HIDAPI_Device *device) WriteProprietary(ctx, k_eSwitchProprietaryCommandIDs_ForceUSB, NULL, 0, SDL_FALSE); } } else if (ctx->m_bUsingBluetooth) { - const Uint32 INPUT_WAIT_TIMEOUT_MS = 1000; + const Uint32 INPUT_WAIT_TIMEOUT_MS = 3000; if (SDL_TICKS_PASSED(now, ctx->m_unLastInput + INPUT_WAIT_TIMEOUT_MS)) { /* Bluetooth may have disconnected, try reopening the controller */ size = -1;