mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-10-04 17:06:25 +00:00
Bluetooth devices can recover from over a second of dropped reports
This commit is contained in:
@@ -2057,7 +2057,7 @@ HIDAPI_DriverSwitch_UpdateDevice(SDL_HIDAPI_Device *device)
|
|||||||
WriteProprietary(ctx, k_eSwitchProprietaryCommandIDs_ForceUSB, NULL, 0, SDL_FALSE);
|
WriteProprietary(ctx, k_eSwitchProprietaryCommandIDs_ForceUSB, NULL, 0, SDL_FALSE);
|
||||||
}
|
}
|
||||||
} else if (ctx->m_bUsingBluetooth) {
|
} 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)) {
|
if (SDL_TICKS_PASSED(now, ctx->m_unLastInput + INPUT_WAIT_TIMEOUT_MS)) {
|
||||||
/* Bluetooth may have disconnected, try reopening the controller */
|
/* Bluetooth may have disconnected, try reopening the controller */
|
||||||
size = -1;
|
size = -1;
|
||||||
|
Reference in New Issue
Block a user