mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-06-06 06:34:35 +00:00
haptic: Enable gamepad haptic support under sdl2-compat
(cherry picked from commit c677c913a6)
This commit is contained in:
parent
65eda5fbd4
commit
102bf22db8
1 changed files with 2 additions and 2 deletions
|
|
@ -306,9 +306,9 @@ bool SDL_IsJoystickHaptic(SDL_Joystick *joystick)
|
|||
|
||||
SDL_LockJoysticks();
|
||||
{
|
||||
// Must be a valid joystick
|
||||
// Must be a valid joystick, but not a gamepad unless running under sdl2-compat
|
||||
if (SDL_IsJoystickValid(joystick) &&
|
||||
!SDL_IsGamepad(SDL_GetJoystickID(joystick))) {
|
||||
(SDL_GetHintBoolean("SDL2_COMPAT", false) || !SDL_IsGamepad(SDL_GetJoystickID(joystick)))) {
|
||||
#ifdef SDL_JOYSTICK_HIDAPI
|
||||
result = SDL_SYS_JoystickIsHaptic(joystick) || SDL_HIDAPI_JoystickIsHaptic(joystick);
|
||||
#else
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue