mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-09-07 03:48:14 +00:00
hidapi: switch: Handle MCU input reports
(cherry picked from commit 425062c123
)
This commit is contained in:

committed by
Sam Lantinga

parent
38619bb28d
commit
950ff0056a
@@ -71,6 +71,7 @@ typedef enum
|
|||||||
{
|
{
|
||||||
k_eSwitchInputReportIDs_SubcommandReply = 0x21,
|
k_eSwitchInputReportIDs_SubcommandReply = 0x21,
|
||||||
k_eSwitchInputReportIDs_FullControllerState = 0x30,
|
k_eSwitchInputReportIDs_FullControllerState = 0x30,
|
||||||
|
k_eSwitchInputReportIDs_FullControllerAndMcuState = 0x31,
|
||||||
k_eSwitchInputReportIDs_SimpleControllerState = 0x3F,
|
k_eSwitchInputReportIDs_SimpleControllerState = 0x3F,
|
||||||
k_eSwitchInputReportIDs_CommandAck = 0x81,
|
k_eSwitchInputReportIDs_CommandAck = 0x81,
|
||||||
} ESwitchInputReportIDs;
|
} ESwitchInputReportIDs;
|
||||||
@@ -2166,6 +2167,7 @@ static SDL_bool HIDAPI_DriverSwitch_UpdateDevice(SDL_HIDAPI_Device *device)
|
|||||||
HandleSimpleControllerState(joystick, ctx, (SwitchSimpleStatePacket_t *)&ctx->m_rgucReadBuffer[1]);
|
HandleSimpleControllerState(joystick, ctx, (SwitchSimpleStatePacket_t *)&ctx->m_rgucReadBuffer[1]);
|
||||||
break;
|
break;
|
||||||
case k_eSwitchInputReportIDs_FullControllerState:
|
case k_eSwitchInputReportIDs_FullControllerState:
|
||||||
|
case k_eSwitchInputReportIDs_FullControllerAndMcuState:
|
||||||
HandleFullControllerState(joystick, ctx, (SwitchStatePacket_t *)&ctx->m_rgucReadBuffer[1]);
|
HandleFullControllerState(joystick, ctx, (SwitchStatePacket_t *)&ctx->m_rgucReadBuffer[1]);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
Reference in New Issue
Block a user