src/haptic/darwin/SDL_syshaptic.c
changeset 13860 d16844f83bfd
parent 13789 a359f4f93439
     1.1 --- a/src/haptic/darwin/SDL_syshaptic.c	Wed May 27 09:28:03 2020 -0700
     1.2 +++ b/src/haptic/darwin/SDL_syshaptic.c	Wed May 27 09:57:26 2020 -0700
     1.3 @@ -599,12 +599,14 @@
     1.4  int
     1.5  SDL_SYS_JoystickIsHaptic(SDL_Joystick * joystick)
     1.6  {
     1.7 +#ifdef SDL_JOYSTICK_IOKIT
     1.8      if (joystick->driver != &SDL_DARWIN_JoystickDriver) {
     1.9          return SDL_FALSE;
    1.10      }
    1.11      if (joystick->hwdata->ffservice != 0) {
    1.12          return SDL_TRUE;
    1.13      }
    1.14 +#endif
    1.15      return SDL_FALSE;
    1.16  }
    1.17  
    1.18 @@ -615,6 +617,7 @@
    1.19  int
    1.20  SDL_SYS_JoystickSameHaptic(SDL_Haptic * haptic, SDL_Joystick * joystick)
    1.21  {
    1.22 +#ifdef SDL_JOYSTICK_IOKIT
    1.23      if (joystick->driver != &SDL_DARWIN_JoystickDriver) {
    1.24          return 0;
    1.25      }
    1.26 @@ -622,6 +625,7 @@
    1.27                            joystick->hwdata->ffservice)) {
    1.28          return 1;
    1.29      }
    1.30 +#endif
    1.31      return 0;
    1.32  }
    1.33  
    1.34 @@ -632,6 +636,7 @@
    1.35  int
    1.36  SDL_SYS_HapticOpenFromJoystick(SDL_Haptic * haptic, SDL_Joystick * joystick)
    1.37  {
    1.38 +#ifdef SDL_JOYSTICK_IOKIT
    1.39      int device_index = 0;
    1.40      SDL_hapticlist_item *item;
    1.41      
    1.42 @@ -648,6 +653,9 @@
    1.43      }
    1.44  
    1.45      return SDL_SYS_HapticOpenFromService(haptic, joystick->hwdata->ffservice);
    1.46 +#else
    1.47 +	return -1;
    1.48 +#endif
    1.49  }
    1.50  
    1.51