# SDL: Bluetooth devices can recover from over a second of dropped reports

**URL:** <https://discourse.libsdl.org/t/sdl-bluetooth-devices-can-recover-from-over-a-second-of-dropped-reports/38150>\
**Category:** SDL Commits\
**Created:** [August 9, 2022, 9:08pm UTC](https://discourse.libsdl.org/t/sdl-bluetooth-devices-can-recover-from-over-a-second-of-dropped-reports/38150 "2022-08-09T21:08:01Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![SDLPushPostBot](https://discourse.libsdl.org/user_avatar/discourse.libsdl.org/sdlpushpostbot/32/4370_2.png) [@SDLPushPostBot](https://discourse.libsdl.org/u/SDLPushPostBot)\
**Post date:** [August 9, 2022, 9:08pm UTC](https://discourse.libsdl.org/t/sdl-bluetooth-devices-can-recover-from-over-a-second-of-dropped-reports/38150/1 "2022-08-09T21:08:01Z")

</div>

> <https://github.com/libsdl-org/SDL/commit/da50f1bd3eb65adcc1fc673346d0c9b74f055543>

```diff
From da50f1bd3eb65adcc1fc673346d0c9b74f055543 Mon Sep 17 00:00:00 2001
From: Sam Lantinga <[EMAIL REDACTED]>
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 0779e9b5301..373d20e439a 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;

```
