From 425062c123f88b6890277905714e02c9375f5b5e Mon Sep 17 00:00:00 2001 From: Narr the Reg Date: Mon, 26 Jun 2023 10:54:52 -0600 Subject: [PATCH] hidapi: switch: Handle MCU input reports --- src/joystick/hidapi/SDL_hidapi_switch.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/joystick/hidapi/SDL_hidapi_switch.c b/src/joystick/hidapi/SDL_hidapi_switch.c index 377e0593e1..7051aeef0e 100644 --- a/src/joystick/hidapi/SDL_hidapi_switch.c +++ b/src/joystick/hidapi/SDL_hidapi_switch.c @@ -67,6 +67,7 @@ typedef enum { k_eSwitchInputReportIDs_SubcommandReply = 0x21, k_eSwitchInputReportIDs_FullControllerState = 0x30, + k_eSwitchInputReportIDs_FullControllerAndMcuState = 0x31, k_eSwitchInputReportIDs_SimpleControllerState = 0x3F, k_eSwitchInputReportIDs_CommandAck = 0x81, } ESwitchInputReportIDs; @@ -2201,6 +2202,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: