src/haptic/darwin/SDL_syshaptic.c
branchgsoc2008_force_feedback
changeset 2637 2f826c229d77
parent 2633 6b0d1f494c10
child 2639 668fee3b268a
     1.1 --- a/src/haptic/darwin/SDL_syshaptic.c	Wed Aug 06 17:14:54 2008 +0000
     1.2 +++ b/src/haptic/darwin/SDL_syshaptic.c	Sun Aug 10 19:45:38 2008 +0000
     1.3 @@ -447,6 +447,8 @@
     1.4  int
     1.5  SDL_SYS_JoystickIsHaptic(SDL_Joystick * joystick)
     1.6  {
     1.7 +   if (joystick->hwdata->ffservice != 0)
     1.8 +      return SDL_TRUE;
     1.9     return SDL_FALSE;
    1.10  }
    1.11  
    1.12 @@ -457,6 +459,8 @@
    1.13  int
    1.14  SDL_SYS_JoystickSameHaptic(SDL_Haptic * haptic, SDL_Joystick * joystick)
    1.15  {
    1.16 +   if (IOObjectIsEqualTo(haptic->hwdata->device, joystick->hwdata->ffservice))
    1.17 +      return 1;
    1.18     return 0;
    1.19  }
    1.20  
    1.21 @@ -467,7 +471,8 @@
    1.22  int
    1.23  SDL_SYS_HapticOpenFromJoystick(SDL_Haptic * haptic, SDL_Joystick * joystick)
    1.24  {
    1.25 -   return -1;
    1.26 +   return SDL_SYS_HapticOpenFromService(haptic,
    1.27 +                joystick->hwdata->ffservice);
    1.28  }
    1.29  
    1.30