Add two-player and per-controller type mapping support for the Reflex Adapt USB adaptor. Similar to other arduino leonardo based devices. (#803)

This commit is contained in:
Martin Donlon
2023-08-16 19:07:36 +01:00
committed by GitHub
parent 7ad8106aed
commit cdec51b121

View File

@@ -3451,6 +3451,7 @@ void mergedevs()
make_unique(0x045E, 0x02A1, 1); // Xbox 360 wireless receiver
make_unique(0x8282, 0x3201, 1); // Irken Labs JAMMA Expander / Mojo Retro Adapter
make_unique(0x1209, 0xFACA, 1); // ControllaBLE
make_unique(0x16D0, 0x127E, 1); // Reflex Adapt to USB
if (cfg.no_merge_vid)
{
@@ -4272,8 +4273,9 @@ static void setup_wheels()
}
}
// Namco NeGcon via RetroZord adapter
else if (input[i].vid == 0x2341 && input[i].pid == 0x8036 && strstr(input[i].name, "RZordPsWheel"))
//Namco NeGcon via RetroZord adapter or Reflex Adapt
else if ((input[i].vid == 0x2341 && input[i].pid == 0x8036 && strstr(input[i].name, "RZordPsWheel")) ||
(input[i].vid == 0x16D0 && input[i].pid == 0x127E && strstr(input[i].name, "ReflexPSWheel")))
{
input[i].wh_accel = 6;
input[i].wh_brake = 10;
@@ -4509,8 +4511,9 @@ int input_test(int getchar)
input[n].lightgun = 1;
}
//Namco Guncon via RetroZord adapter
if (input[n].vid == 0x2341 && input[n].pid == 0x8036 && (strstr(uniq, "RZordPsGun") || strstr(input[n].name, "RZordPsGun")))
//Namco Guncon via RetroZord adapter or Reflex Adapt
if ((input[n].vid == 0x2341 && input[n].pid == 0x8036 && (strstr(uniq, "RZordPsGun") || strstr(input[n].name, "RZordPsGun"))) ||
(input[n].vid == 0x16D0 && input[n].pid == 0x127E && (strstr(uniq, "ReflexPSGun") || strstr(input[n].name, "ReflexPSGun"))))
{
input[n].quirk = QUIRK_LIGHTGUN;
input[n].lightgun = 1;
@@ -4590,7 +4593,8 @@ int input_test(int getchar)
}
//Arduino and Teensy devices may share the same VID:PID, so additional field UNIQ is used to differentiate them
if ((input[n].vid == 0x2341 || (input[n].vid == 0x16C0 && (input[n].pid>>8) == 0x4)) && strlen(uniq))
//Reflex Adapt also uses the UNIQ field to differentiate between device modes
if ((input[n].vid == 0x2341 || (input[n].vid == 0x16C0 && (input[n].pid>>8) == 0x4) || (input[n].vid == 0x16D0 && input[n].pid == 0x127E)) && strlen(uniq))
{
snprintf(input[n].idstr, sizeof(input[n].idstr), "%04x_%04x_%s", input[n].vid, input[n].pid, uniq);
char *p;