Browse Source

Bluetooth devices can recover from over a second of dropped reports

Sam Lantinga 2 years ago
parent
commit
da50f1bd3e
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/joystick/hidapi/SDL_hidapi_switch.c

+ 1 - 1
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;