Skip to content

Commit

Permalink
Added support for gamepad sensor fusion with the Razer Kishi
Browse files Browse the repository at this point in the history
  • Loading branch information
slouken committed Jun 20, 2023
1 parent 91198ba commit 5f3213e
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions src/joystick/SDL_joystick.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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)) {
Expand Down

0 comments on commit 5f3213e

Please sign in to comment.