From 5f3213eb0e51c9c46e6c3b76d003e59046095c67 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Tue, 20 Jun 2023 08:40:30 -0700 Subject: [PATCH] Added support for gamepad sensor fusion with the Razer Kishi --- src/joystick/SDL_joystick.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/joystick/SDL_joystick.c b/src/joystick/SDL_joystick.c index b18f0e5b5..a4f8939ee 100644 --- a/src/joystick/SDL_joystick.c +++ b/src/joystick/SDL_joystick.c @@ -511,14 +511,6 @@ static SDL_bool SDL_JoystickAxesCenteredAtZero(SDL_Joystick *joystick) #endif /* __WINRT__ */ } -static SDL_bool IsBackboneOne(SDL_Joystick *joystick) -{ - if (joystick->name && SDL_strstr(joystick->name, "Backbone One")) { - return SDL_TRUE; - } - return SDL_FALSE; -} - static SDL_bool IsROGAlly(SDL_Joystick *joystick) { Uint16 vendor, product; @@ -606,7 +598,9 @@ static SDL_bool ShouldAttemptSensorFusion(SDL_Joystick *joystick, SDL_bool *inve } /* See if this is another known wraparound gamepad */ - if (IsBackboneOne(joystick)) { + if (joystick->name && + (SDL_strstr(joystick->name, "Backbone One") || + SDL_strstr(joystick->name, "Kishi"))) { return SDL_TRUE; } if (IsROGAlly(joystick)) {