Commit 9aca2a4339bfd1fda0757821748e533d61ee2210

Narr the Reg 2023-06-26T10:54:52

hidapi: switch: Handle MCU input reports (cherry picked from commit 425062c123f88b6890277905714e02c9375f5b5e) (cherry picked from commit 950ff0056a74a2cb6f6ff0b5ebaa9c16c305234a)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
diff --git a/src/joystick/hidapi/SDL_hidapi_switch.c b/src/joystick/hidapi/SDL_hidapi_switch.c
index 9544806..15510fe 100644
--- a/src/joystick/hidapi/SDL_hidapi_switch.c
+++ b/src/joystick/hidapi/SDL_hidapi_switch.c
@@ -71,6 +71,7 @@ typedef enum
 {
     k_eSwitchInputReportIDs_SubcommandReply = 0x21,
     k_eSwitchInputReportIDs_FullControllerState = 0x30,
+    k_eSwitchInputReportIDs_FullControllerAndMcuState = 0x31,
     k_eSwitchInputReportIDs_SimpleControllerState = 0x3F,
     k_eSwitchInputReportIDs_CommandAck = 0x81,
 } ESwitchInputReportIDs;
@@ -2166,6 +2167,7 @@ static SDL_bool HIDAPI_DriverSwitch_UpdateDevice(SDL_HIDAPI_Device *device)
                 HandleSimpleControllerState(joystick, ctx, (SwitchSimpleStatePacket_t *)&ctx->m_rgucReadBuffer[1]);
                 break;
             case k_eSwitchInputReportIDs_FullControllerState:
+            case k_eSwitchInputReportIDs_FullControllerAndMcuState:
                 HandleFullControllerState(joystick, ctx, (SwitchStatePacket_t *)&ctx->m_rgucReadBuffer[1]);
                 break;
             default: