From 40478fc19b9e5e5f6e7e153f97cdb0d21b53573e Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Fri, 19 Feb 2016 01:53:44 -0500 Subject: [PATCH] Fix the bug causing the 4th controller to be unrecognized --- limelight-common/Input.h | 2 +- limelight-common/InputStream.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/limelight-common/Input.h b/limelight-common/Input.h index 256adeb..e4d9714 100644 --- a/limelight-common/Input.h +++ b/limelight-common/Input.h @@ -55,7 +55,7 @@ typedef struct _NV_CONTROLLER_PACKET { #define PACKET_TYPE_MULTI_CONTROLLER 0x1E #define MC_HEADER_A 0x0000000D #define MC_HEADER_B 0x001A -#define MC_MID_A 0x0007 +#define MC_ACTIVE_CONTROLLER_FLAGS 0x000F #define MC_MID_B 0x0014 #define MC_TAIL_A 0x0000009C #define MC_TAIL_B 0x0055 diff --git a/limelight-common/InputStream.c b/limelight-common/InputStream.c index b412245..3e8422a 100644 --- a/limelight-common/InputStream.c +++ b/limelight-common/InputStream.c @@ -434,7 +434,7 @@ static int sendControllerEventInternal(short controllerNumber, short buttonFlags holder->packet.multiController.headerA = MC_HEADER_A; holder->packet.multiController.headerB = MC_HEADER_B; holder->packet.multiController.controllerNumber = controllerNumber; - holder->packet.multiController.midA = MC_MID_A; + holder->packet.multiController.midA = MC_ACTIVE_CONTROLLER_FLAGS; holder->packet.multiController.midB = MC_MID_B; holder->packet.multiController.buttonFlags = buttonFlags; holder->packet.multiController.leftTrigger = leftTrigger;