Skip to content

Commit 87543ba

Browse files
mitchellcairnsslouken
authored andcommitted
SInput: Mapping updates for GCUltimate/ProGCC
- In previous firmwares for my gamepads, the buttons were sent in a static order for ABXY. - To better be 'transparent' to the driver and save myself from future fragmentation, I am updating the mappings to be consistent, where the HID report should always expect to receive the button inputs based on cardinal button directions rather than button labels. - This better aligns with the existing 'fallback' behavior of a generic device. - Coincides with firmware library update: HandHeldLegend/HOJA-LIB-RP2040#30
1 parent 7487880 commit 87543ba

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/joystick/SDL_gamepad.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -823,15 +823,15 @@ static GamepadMapping_t *SDL_CreateMappingForHIDAPIGamepad(SDL_GUID guid)
823823
switch (sub_type) {
824824
default:
825825
// ProGCC Primary Mapping
826-
SDL_strlcat(mapping_string, "a:b1,b:b0,back:b11,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b4,lefttrigger:b8,leftx:a0,lefty:a1,misc1:b13,rightshoulder:b7,rightstick:b5,righttrigger:b9,rightx:a2,righty:a3,start:b10,x:b3,y:b2,hint:!SDL_GAMECONTROLLER_USE_BUTTON_LABELS:=1,", sizeof(mapping_string));
826+
SDL_strlcat(mapping_string, "b:b0,a:b1,y:b2,x:b3,back:b11,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b4,lefttrigger:b8,leftx:a0,lefty:a1,misc1:b13,rightshoulder:b7,rightstick:b5,righttrigger:b9,rightx:a2,righty:a3,start:b10,hint:!SDL_GAMECONTROLLER_USE_BUTTON_LABELS:=1,", sizeof(mapping_string));
827827
break;
828828
}
829829
break;
830830
case USB_PRODUCT_HANDHELDLEGEND_GCULTIMATE:
831831
switch (sub_type) {
832832
default:
833833
// GC Ultimate Primary Map
834-
SDL_strlcat(mapping_string, "a:b0,b:b2,back:b11,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b4,lefttrigger:a4,leftx:a0,lefty:a1,misc1:b13,misc2:b14,rightshoulder:b7,rightstick:b5,righttrigger:a5,rightx:a2,righty:a3,start:b10,x:b1,y:b3,misc3:b8,misc4:b9,hint:!SDL_GAMECONTROLLER_USE_GAMECUBE_LABELS:=1,", sizeof(mapping_string));
834+
SDL_strlcat(mapping_string, "b:b0,a:b1,y:b2,x:b3,back:b11,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b4,lefttrigger:a4,leftx:a0,lefty:a1,misc1:b13,misc2:b14,rightshoulder:b7,rightstick:b5,righttrigger:a5,rightx:a2,righty:a3,start:b10,misc3:b8,misc4:b9,hint:!SDL_GAMECONTROLLER_USE_GAMECUBE_LABELS:=1,", sizeof(mapping_string));
835835
break;
836836
}
837837
break;

0 commit comments

Comments
 (0)