# HG changeset patch # User Michael Pavone # Date 1740467714 28800 # Node ID 023aa4839ff67414233449f1cdb7c7482a7edc68 # Parent 1ef2734ac052438979f21b0bf4a5aeb561f9a6e4 Make Hori Fighting Commander controllers work out of the box diff -r 1ef2734ac052 -r 023aa4839ff6 controller_info.c --- a/controller_info.c Sun Feb 23 13:56:22 2025 -0800 +++ b/controller_info.c Mon Feb 24 23:15:14 2025 -0800 @@ -176,6 +176,23 @@ SDL_GameControllerClose(control); for (uint32_t i = 0; i < num_heuristics; i++) { + if (strstr(name, "Hori Fighting Commander")) { + uint8_t is_xbox = strstr(name, "Xbox") || strstr(name, "ONE"); + controller_info res = { + .variant = VARIANT_6B_RIGHT, + .name = name, + .stick_deadzone = DEFAULT_DEADZONE, + .trigger_deadzone = DEFAULT_DEADZONE + }; + if (is_xbox) { + res.type = TYPE_XBOX; + res.subtype = strstr(name, "ONE") ? SUBTYPE_XBONE : SUBTYPE_X360; + } else { + res.type = TYPE_PSX; + res.subtype = strstr(name, "PS3") ? SUBTYPE_PS3 : SUBTYPE_PS4; + } + return res; + } if (strstr(name, heuristics[i].name)) { controller_info res = heuristics[i].info; res.name = name;