mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-09 20:32:04 +09:00
HID: apply patchs to support extra game pads
Ref: https://forum.odroid.com/viewtopic.php?f=177&t=34769#p263859
This commit is contained in:
@@ -1113,12 +1113,12 @@ static void wiimod_classic_in_ext(struct wiimote_data *wdata, const __u8 *ext)
|
||||
rt <<= 1;
|
||||
lt <<= 1;
|
||||
|
||||
input_report_abs(wdata->extension.input, ABS_HAT1X, lx - 0x20);
|
||||
input_report_abs(wdata->extension.input, ABS_HAT1Y, ly - 0x20);
|
||||
input_report_abs(wdata->extension.input, ABS_HAT2X, rx - 0x20);
|
||||
input_report_abs(wdata->extension.input, ABS_HAT2Y, ry - 0x20);
|
||||
input_report_abs(wdata->extension.input, ABS_HAT3X, rt);
|
||||
input_report_abs(wdata->extension.input, ABS_HAT3Y, lt);
|
||||
input_report_abs(wdata->extension.input, ABS_HAT0X, lx - 0x20);
|
||||
input_report_abs(wdata->extension.input, ABS_HAT0Y, ly - 0x20);
|
||||
input_report_abs(wdata->extension.input, ABS_HAT1X, rx - 0x20);
|
||||
input_report_abs(wdata->extension.input, ABS_HAT1Y, ry - 0x20);
|
||||
input_report_abs(wdata->extension.input, ABS_HAT2X, rt);
|
||||
input_report_abs(wdata->extension.input, ABS_HAT2Y, lt);
|
||||
|
||||
input_report_key(wdata->extension.input,
|
||||
wiimod_classic_map[WIIMOD_CLASSIC_KEY_RIGHT],
|
||||
@@ -1228,12 +1228,16 @@ static int wiimod_classic_probe(const struct wiimod_ops *ops,
|
||||
wdata->extension.input->keybit);
|
||||
|
||||
set_bit(EV_ABS, wdata->extension.input->evbit);
|
||||
set_bit(ABS_HAT0X, wdata->extension.input->absbit);
|
||||
set_bit(ABS_HAT0Y, wdata->extension.input->absbit);
|
||||
set_bit(ABS_HAT1X, wdata->extension.input->absbit);
|
||||
set_bit(ABS_HAT1Y, wdata->extension.input->absbit);
|
||||
set_bit(ABS_HAT2X, wdata->extension.input->absbit);
|
||||
set_bit(ABS_HAT2Y, wdata->extension.input->absbit);
|
||||
set_bit(ABS_HAT3X, wdata->extension.input->absbit);
|
||||
set_bit(ABS_HAT3Y, wdata->extension.input->absbit);
|
||||
input_set_abs_params(wdata->extension.input,
|
||||
ABS_HAT0X, -30, 30, 1, 1);
|
||||
input_set_abs_params(wdata->extension.input,
|
||||
ABS_HAT0Y, -30, 30, 1, 1);
|
||||
input_set_abs_params(wdata->extension.input,
|
||||
ABS_HAT1X, -30, 30, 1, 1);
|
||||
input_set_abs_params(wdata->extension.input,
|
||||
@@ -1242,10 +1246,6 @@ static int wiimod_classic_probe(const struct wiimod_ops *ops,
|
||||
ABS_HAT2X, -30, 30, 1, 1);
|
||||
input_set_abs_params(wdata->extension.input,
|
||||
ABS_HAT2Y, -30, 30, 1, 1);
|
||||
input_set_abs_params(wdata->extension.input,
|
||||
ABS_HAT3X, -30, 30, 1, 1);
|
||||
input_set_abs_params(wdata->extension.input,
|
||||
ABS_HAT3Y, -30, 30, 1, 1);
|
||||
|
||||
ret = input_register_device(wdata->extension.input);
|
||||
if (ret)
|
||||
|
||||
@@ -172,6 +172,53 @@ static const struct hid_blacklist {
|
||||
{ USB_VENDOR_ID_DRACAL_RAPHNET, USB_DEVICE_ID_RAPHNET_4NES4SNES, HID_QUIRK_MULTI_INPUT },
|
||||
{ USB_VENDOR_ID_INNOMEDIA, USB_DEVICE_ID_INNEX_GENESIS_ATARI, HID_QUIRK_MULTI_INPUT },
|
||||
|
||||
// Juyao
|
||||
{ 0x0314,0x0326,0x040 },
|
||||
{ 0x0314,0x0328,0x040 },
|
||||
|
||||
// 4NES4SNES
|
||||
{ 0x1781,0x0A9D,0x040 },
|
||||
|
||||
// Retrolink SNES
|
||||
{ 0x1292,0x5346,0x040 },
|
||||
{ 0x1292,0x5366,0x040 },
|
||||
|
||||
// Retrobit Atari to USB Driver
|
||||
{ 0x1292,0x4154,0x040 },
|
||||
|
||||
// Retrobit Genesis to PC USB Adapter
|
||||
{ 0x1292,0x4745,0x040 },
|
||||
|
||||
// Retrode
|
||||
{ 0x0403,0x97c1,0x040 },
|
||||
|
||||
// HuiJia USB GamePad Mayflash Sega Saturn
|
||||
{ 0x0e8f,0x3010,0x040 },
|
||||
|
||||
// HuiJia USB GamePad Mayflash NES SNES
|
||||
{ 0x0079,0x1804,0x040 },
|
||||
|
||||
// Mayflash Dreamcast
|
||||
{ 0x0e8f,0x3013,0x040 },
|
||||
|
||||
// Xin-Mo 2players 20pins
|
||||
{ 0x16c0,0x75e1,0x040 },
|
||||
|
||||
// Xinmo 18 pins USB THT 2P arcade controller THT 2P arcade controller
|
||||
{ 0x16c0,0x05e1,0x040 },
|
||||
|
||||
// USB PS2 Adapter GreenAsia Electronics
|
||||
{ 0xe8f,0x1013,0x040 },
|
||||
|
||||
// HuiJia USB GamePad Mayflash N64 - need test
|
||||
{ 0xe8f,0x3013,0x040 },
|
||||
|
||||
// XCSOURCE 2 Encoder USB - Twin USB Gamepad
|
||||
{ 0x810,0xe001,0x040 },
|
||||
|
||||
// 3H Dual Arcade 2Players
|
||||
{ 0x16c0,0x05e0,0x040 },
|
||||
|
||||
{ 0, 0 }
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user