Browse Source

Fixed Y + right shoulder button combination on third party Switch controllers

Sam Lantinga 1 year ago
parent
commit
6e53a36414
1 changed files with 4 additions and 4 deletions
  1. 4 4
      src/joystick/hidapi/SDL_hidapi_switch.c

+ 4 - 4
src/joystick/hidapi/SDL_hidapi_switch.c

@@ -2562,13 +2562,13 @@ 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 {
+            if (ctx->m_rgucReadBuffer[0] == k_eSwitchInputReportIDs_SubcommandReply) {
+                continue;
+            }
+
             ctx->m_nCurrentInputMode = ctx->m_rgucReadBuffer[0];
             ctx->m_nCurrentInputMode = ctx->m_rgucReadBuffer[0];
 
 
             switch (ctx->m_rgucReadBuffer[0]) {
             switch (ctx->m_rgucReadBuffer[0]) {