Added support for the Hyperkin X91
authorSam Lantinga <slouken@libsdl.org>
Mon, 25 Nov 2019 15:02:50 -0800
changeset 132887249a6d4aa7e
parent 13287 38b490ed9e32
child 13289 42c6ff45c3e1
Added support for the Hyperkin X91
src/hidapi/libusb/hid.c
src/joystick/SDL_gamecontrollerdb.h
src/joystick/controller_type.h
src/joystick/hidapi/SDL_hidapijoystick.c
     1.1 --- a/src/hidapi/libusb/hid.c	Mon Nov 25 15:02:48 2019 -0800
     1.2 +++ b/src/hidapi/libusb/hid.c	Mon Nov 25 15:02:50 2019 -0800
     1.3 @@ -491,7 +491,7 @@
     1.4  		0x06a3, /* Saitek */
     1.5  		0x0738, /* Mad Catz */
     1.6  		0x07ff, /* Mad Catz */
     1.7 -		0x0e6f, /* Unknown */
     1.8 +		0x0e6f, /* PDP */
     1.9  		0x0f0d, /* Hori */
    1.10  		0x11c9, /* Nacon */
    1.11  		0x12ab, /* Unknown */
    1.12 @@ -526,10 +526,11 @@
    1.13          static const int SUPPORTED_VENDORS[] = {
    1.14              0x045e, /* Microsoft */
    1.15              0x0738, /* Mad Catz */
    1.16 -            0x0e6f, /* Unknown */
    1.17 +            0x0e6f, /* PDP */
    1.18              0x0f0d, /* Hori */
    1.19              0x1532, /* Razer Wildcat */
    1.20              0x24c6, /* PowerA */
    1.21 +            0x2e24, /* Hyperkin */
    1.22          };
    1.23  
    1.24  	if (intf_desc->bInterfaceNumber == 0 &&
    1.25 @@ -1433,7 +1434,7 @@
    1.26  	LANG("Lithuanian", "lt", 0x0427),
    1.27  	LANG("F.Y.R.O. Macedonia", "mk", 0x042F),
    1.28  	LANG("Malay - Malaysia", "ms_my", 0x043E),
    1.29 -	LANG("Malay – Brunei", "ms_bn", 0x083E),
    1.30 +	LANG("Malay ??? Brunei", "ms_bn", 0x083E),
    1.31  	LANG("Maltese", "mt", 0x043A),
    1.32  	LANG("Marathi", "mr", 0x044E),
    1.33  	LANG("Norwegian - Bokml", "no_no", 0x0414),
    1.34 @@ -1484,7 +1485,7 @@
    1.35  	LANG("Ukrainian", "uk", 0x0422),
    1.36  	LANG("Urdu", "ur", 0x0420),
    1.37  	LANG("Uzbek - Cyrillic", "uz_uz", 0x0843),
    1.38 -	LANG("Uzbek – Latin", "uz_uz", 0x0443),
    1.39 +	LANG("Uzbek ??? Latin", "uz_uz", 0x0443),
    1.40  	LANG("Vietnamese", "vi", 0x042A),
    1.41  	LANG("Xhosa", "xh", 0x0434),
    1.42  	LANG("Yiddish", "yi", 0x043D),
     2.1 --- a/src/joystick/SDL_gamecontrollerdb.h	Mon Nov 25 15:02:48 2019 -0800
     2.2 +++ b/src/joystick/SDL_gamecontrollerdb.h	Mon Nov 25 15:02:50 2019 -0800
     2.3 @@ -422,6 +422,7 @@
     2.4      "030000000d0f00005e00000011010000,Hori Fighting Commander 4 (PS4),a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,",
     2.5      "03000000ad1b000001f5000033050000,Hori Pad EX Turbo 2,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,",
     2.6      "030000008f0e00001330000010010000,HuiJia SNES Controller,a:b2,b:b1,back:b8,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b6,rightshoulder:b7,start:b9,x:b3,y:b0,",
     2.7 +    "03000000242e00008816000001010000,Hyperkin X91,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,",
     2.8      "03000000d80400008200000003000000,IMS PCU#0 Gamepad Interface,a:b1,b:b0,back:b4,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,start:b5,x:b3,y:b2,",
     2.9      "03000000fd0500000030000000010000,InterAct GoPad I-73000 (Fighting Game Layout),a:b3,b:b4,back:b6,leftx:a0,lefty:a1,rightshoulder:b2,righttrigger:b5,start:b7,x:b0,y:b1,",
    2.10      "030000006e0500000320000010010000,JC-U3613M - DirectInput Mode,a:b2,b:b3,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b8,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b9,righttrigger:b7,rightx:a2,righty:a3,start:b11,x:b0,y:b1,",
     3.1 --- a/src/joystick/controller_type.h	Mon Nov 25 15:02:48 2019 -0800
     3.2 +++ b/src/joystick/controller_type.h	Mon Nov 25 15:02:50 2019 -0800
     3.3 @@ -224,6 +224,9 @@
     3.4  	{ MAKE_CONTROLLER_ID( 0x0e6f, 0x021f ), k_eControllerType_XBox360Controller },	// Rock Candy Gamepad for Xbox 360
     3.5  	{ MAKE_CONTROLLER_ID( 0x0e6f, 0x0246 ), k_eControllerType_XBoxOneController },	// Rock Candy Gamepad for Xbox One 2015
     3.6  	{ MAKE_CONTROLLER_ID( 0x0e6f, 0x02a0 ), k_eControllerType_XBox360Controller },	// Counterfeit 360Controller
     3.7 +	{ MAKE_CONTROLLER_ID( 0x0e6f, 0x02ab ), k_eControllerType_XBoxOneController },	// PDP Controller for Xbox One
     3.8 +	{ MAKE_CONTROLLER_ID( 0x0e6f, 0x02a4 ), k_eControllerType_XBoxOneController },	// PDP Wired Controller for Xbox One - Stealth Series
     3.9 +	{ MAKE_CONTROLLER_ID( 0x0e6f, 0x02a6 ), k_eControllerType_XBoxOneController },	// PDP Wired Controller for Xbox One - Camo Series
    3.10  	{ MAKE_CONTROLLER_ID( 0x0e6f, 0x0301 ), k_eControllerType_XBox360Controller },	// Logic3 Controller
    3.11  	{ MAKE_CONTROLLER_ID( 0x0e6f, 0x0346 ), k_eControllerType_XBoxOneController },	// Rock Candy Gamepad for Xbox One 2016
    3.12  	{ MAKE_CONTROLLER_ID( 0x0e6f, 0x0401 ), k_eControllerType_XBox360Controller },	// Logic3 Controller
    3.13 @@ -324,6 +327,7 @@
    3.14  	{ MAKE_CONTROLLER_ID( 0x24c6, 0xfafc ), k_eControllerType_XBox360Controller },	// Afterglow Gamepad 1
    3.15  	{ MAKE_CONTROLLER_ID( 0x24c6, 0xfafe ), k_eControllerType_XBox360Controller },	// Rock Candy Gamepad for Xbox 360
    3.16  	{ MAKE_CONTROLLER_ID( 0x24c6, 0xfafd ), k_eControllerType_XBox360Controller },	// Afterglow Gamepad 3
    3.17 +	{ MAKE_CONTROLLER_ID( 0x2e24, 0x1688 ), k_eControllerType_XBoxOneController },	// Hyperkin X91
    3.18  	//{ MAKE_CONTROLLER_ID( 0x0955, 0x7210 ), k_eControllerType_XBox360Controller },	// Nvidia Shield local controller
    3.19  	{ MAKE_CONTROLLER_ID( 0x0e6f, 0x0205 ), k_eControllerType_XBoxOneController },	// Victrix Pro FS Xbox One Edition
    3.20  	
     4.1 --- a/src/joystick/hidapi/SDL_hidapijoystick.c	Mon Nov 25 15:02:48 2019 -0800
     4.2 +++ b/src/joystick/hidapi/SDL_hidapijoystick.c	Mon Nov 25 15:02:50 2019 -0800
     4.3 @@ -557,6 +557,7 @@
     4.4          { MAKE_VIDPID(0x24c6, 0x5b03), "Thrustmaster Ferrari 458 Racing Wheel" },
     4.5          { MAKE_VIDPID(0x24c6, 0x5d04), "Razer Sabertooth" },
     4.6          { MAKE_VIDPID(0x24c6, 0xfafe), "Rock Candy Gamepad for Xbox 360" },
     4.7 +        { MAKE_VIDPID(0x2e24, 0x1688), "Hyperkin X91" },
     4.8      };
     4.9      int i;
    4.10      Uint32 vidpid = MAKE_VIDPID(vendor_id, product_id);