Ignore spurious reply packets when reading Nintendo Switch controller reports
(cherry picked from commit 5ee9a840b1)
This commit is contained in:
1 parent
ce6d3c5cc1
commit
f1b19aa744
1 file changed
+4
@@ -2214,6 +2214,10 @@ static SDL_bool HIDAPI_DriverSwitch_UpdateDevice(SDL_HIDAPI_Device *device)
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (ctx->m_rgucReadBuffer[0] == k_eSwitchInputReportIDs_SubcommandReply) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
if (ctx->m_bInputOnly) {
|
if (ctx->m_bInputOnly) {
|
||||||
HandleInputOnlyControllerState(joystick, ctx, (SwitchInputOnlyControllerStatePacket_t *)&ctx->m_rgucReadBuffer[0]);
|
HandleInputOnlyControllerState(joystick, ctx, (SwitchInputOnlyControllerStatePacket_t *)&ctx->m_rgucReadBuffer[0]);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in new issue
Block a user