Actually we don't need to unlock to send k_eSwitchProprietaryCommandIDs_ForceUSB since we don't wait for reply

This commit is contained in:
Sam Lantinga 2022-07-27 09:05:02 -07:00
parent c51464d9d8
commit a169259f62
1 changed files with 0 additions and 2 deletions

View File

@ -1646,9 +1646,7 @@ HIDAPI_DriverSwitch_UpdateDevice(SDL_HIDAPI_Device *device)
const Uint32 INPUT_WAIT_TIMEOUT_MS = 100; const Uint32 INPUT_WAIT_TIMEOUT_MS = 100;
if (SDL_TICKS_PASSED(now, ctx->m_unLastInput + INPUT_WAIT_TIMEOUT_MS)) { if (SDL_TICKS_PASSED(now, ctx->m_unLastInput + INPUT_WAIT_TIMEOUT_MS)) {
/* Steam may have put the controller back into non-reporting mode */ /* Steam may have put the controller back into non-reporting mode */
SDL_UnlockMutex(ctx->device->dev_lock);
WriteProprietary(ctx, k_eSwitchProprietaryCommandIDs_ForceUSB, NULL, 0, SDL_FALSE); WriteProprietary(ctx, k_eSwitchProprietaryCommandIDs_ForceUSB, NULL, 0, SDL_FALSE);
SDL_LockMutex(ctx->device->dev_lock);
} }
} }