From a169259f62b10cada614d77e204a7e03e640de39 Mon Sep 17 00:00:00 2001
From: Sam Lantinga <[EMAIL REDACTED]>
Date: Wed, 27 Jul 2022 09:05:02 -0700
Subject: [PATCH] Actually we don't need to unlock to send
k_eSwitchProprietaryCommandIDs_ForceUSB since we don't wait for reply
---
src/joystick/hidapi/SDL_hidapi_switch.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/src/joystick/hidapi/SDL_hidapi_switch.c b/src/joystick/hidapi/SDL_hidapi_switch.c
index 79f83a21aa9..97843d8c68f 100644
--- a/src/joystick/hidapi/SDL_hidapi_switch.c
+++ b/src/joystick/hidapi/SDL_hidapi_switch.c
@@ -1646,9 +1646,7 @@ HIDAPI_DriverSwitch_UpdateDevice(SDL_HIDAPI_Device *device)
const Uint32 INPUT_WAIT_TIMEOUT_MS = 100;
if (SDL_TICKS_PASSED(now, ctx->m_unLastInput + INPUT_WAIT_TIMEOUT_MS)) {
/* 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);
- SDL_LockMutex(ctx->device->dev_lock);
}
}