Skip to content

Commit

Permalink
SDL_hidapi_switch.c (ConstructSubcommand): lose use of '&' on rumbleData
Browse files Browse the repository at this point in the history
SwitchCommonOutputPacket_t->rumbleData is an array.
  • Loading branch information
sezero committed Nov 13, 2021
1 parent 6ad0fb8 commit a2c27d3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/joystick/hidapi/SDL_hidapi_switch.c
Expand Up @@ -418,7 +418,7 @@ static void ConstructSubcommand(SDL_DriverSwitch_Context *ctx, ESwitchSubcommand
outPacket->commonData.ucPacketType = k_eSwitchOutputReportIDs_RumbleAndSubcommand;
outPacket->commonData.ucPacketNumber = ctx->m_nCommandNumber;

SDL_memcpy(&outPacket->commonData.rumbleData, &ctx->m_RumblePacket.rumbleData, sizeof(ctx->m_RumblePacket.rumbleData));
SDL_memcpy(outPacket->commonData.rumbleData, ctx->m_RumblePacket.rumbleData, sizeof(ctx->m_RumblePacket.rumbleData));

outPacket->ucSubcommandID = ucCommandID;
SDL_memcpy(outPacket->rgucSubcommandData, pBuf, ucLen);
Expand Down

0 comments on commit a2c27d3

Please sign in to comment.