mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-06-12 17:35:38 +00:00
Ignore spurious reply packets when reading Nintendo Switch controller reports
(cherry picked from commit5ee9a840b1) (cherry picked from commitf1b19aa744)
This commit is contained in:
parent
4b91f0793c
commit
fbb9646806
1 changed files with 4 additions and 0 deletions
|
|
@ -2214,6 +2214,10 @@ static SDL_bool HIDAPI_DriverSwitch_UpdateDevice(SDL_HIDAPI_Device *device)
|
|||
continue;
|
||||
}
|
||||
|
||||
if (ctx->m_rgucReadBuffer[0] == k_eSwitchInputReportIDs_SubcommandReply) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (ctx->m_bInputOnly) {
|
||||
HandleInputOnlyControllerState(joystick, ctx, (SwitchInputOnlyControllerStatePacket_t *)&ctx->m_rgucReadBuffer[0]);
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue