diff --git a/src/SDL_utils.c b/src/SDL_utils.c index 8d321430b2..f2090747a8 100644 --- a/src/SDL_utils.c +++ b/src/SDL_utils.c @@ -403,6 +403,10 @@ const char *SDL_GetPersistentString(const char *string) static int PrefixMatch(const char *a, const char *b) { int matchlen = 0; + // Fixes the "HORI HORl Taiko No Tatsujin Drum Controller" + if (SDL_strncmp(a, "HORI ", 5) == 0 && SDL_strncmp(b, "HORl ", 5) == 0) { + return 5; + } while (*a && *b) { if (SDL_tolower((unsigned char)*a++) == SDL_tolower((unsigned char)*b++)) { ++matchlen; @@ -424,8 +428,8 @@ char *SDL_CreateDeviceName(Uint16 vendor, Uint16 product, const char *vendor_nam { "ASTRO Gaming", "ASTRO" }, { "Bensussen Deutsch & Associates,Inc.(BDA)", "BDA" }, { "Guangzhou Chicken Run Network Technology Co., Ltd.", "GameSir" }, - { "HORI CO.,LTD", "HORI" }, { "HORI CO.,LTD.", "HORI" }, + { "HORI CO.,LTD", "HORI" }, { "Mad Catz Inc.", "Mad Catz" }, { "Nintendo Co., Ltd.", "Nintendo" }, { "NVIDIA Corporation ", "" }, diff --git a/src/joystick/SDL_joystick.c b/src/joystick/SDL_joystick.c index 51cc9749c1..b5eaef3964 100644 --- a/src/joystick/SDL_joystick.c +++ b/src/joystick/SDL_joystick.c @@ -2860,7 +2860,8 @@ bool SDL_IsJoystickXboxSeriesX(Uint16 vendor_id, Uint16 product_id) } if (vendor_id == USB_VENDOR_HORI) { if (product_id == USB_PRODUCT_HORI_FIGHTING_COMMANDER_OCTA_SERIES_X || - product_id == USB_PRODUCT_HORI_HORIPAD_PRO_SERIES_X) { + product_id == USB_PRODUCT_HORI_HORIPAD_PRO_SERIES_X || + product_id == USB_PRODUCT_HORI_TAIKO_DRUM_CONTROLLER) { return true; } } diff --git a/src/joystick/usb_ids.h b/src/joystick/usb_ids.h index ac8c55a539..8acf3e7f60 100644 --- a/src/joystick/usb_ids.h +++ b/src/joystick/usb_ids.h @@ -77,6 +77,7 @@ #define USB_PRODUCT_HORI_FIGHTING_STICK_ALPHA_PS5 0x0184 #define USB_PRODUCT_HORI_STEAM_CONTROLLER 0x01AB #define USB_PRODUCT_HORI_STEAM_CONTROLLER_BT 0x0196 +#define USB_PRODUCT_HORI_TAIKO_DRUM_CONTROLLER 0x01b2 #define USB_PRODUCT_LOGITECH_F310 0xc216 #define USB_PRODUCT_LOGITECH_CHILLSTREAM 0xcad1 #define USB_PRODUCT_MADCATZ_SAITEK_SIDE_PANEL_CONTROL_DECK 0x2218