Dummy SDL haptic driver finally builds now. gsoc2008_force_feedback
authorEdgar Simo <bobbens@gmail.com>
Wed, 09 Jul 2008 17:06:54 +0000
branchgsoc2008_force_feedback
changeset 25093b54b3a97046
parent 2508 f23cee9e16fc
child 2510 e6ad7e678fca
Dummy SDL haptic driver finally builds now.
configure.in
include/SDL_config.h.in
src/haptic/dummy/SDL_syshaptic.c
     1.1 --- a/configure.in	Wed Jul 09 16:33:51 2008 +0000
     1.2 +++ b/configure.in	Wed Jul 09 17:06:54 2008 +0000
     1.3 @@ -2580,10 +2580,11 @@
     1.4      SOURCES="$SOURCES $srcdir/src/joystick/dummy/*.c"
     1.5    fi
     1.6  fi
     1.7 -if test x$enable_haptic = xyes; then
     1.8 -  if test x$have_haptic != xyes; then
     1.9 +if test x$have_haptic != xyes; then
    1.10 +    if test x$enable_haptic = xyes; then
    1.11 +        AC_DEFINE(SDL_HAPTIC_DISABLED)
    1.12 +    fi
    1.13      SOURCES="$SOURCES $srcdir/src/haptic/dummy/*.c"
    1.14 -  fi
    1.15  fi
    1.16  if test x$have_cdrom != xyes; then
    1.17      if test x$enable_cdrom = xyes; then
     2.1 --- a/include/SDL_config.h.in	Wed Jul 09 16:33:51 2008 +0000
     2.2 +++ b/include/SDL_config.h.in	Wed Jul 09 17:06:54 2008 +0000
     2.3 @@ -149,6 +149,7 @@
     2.4  #undef SDL_EVENTS_DISABLED
     2.5  #undef SDL_FILE_DISABLED
     2.6  #undef SDL_JOYSTICK_DISABLED
     2.7 +#undef SDL_HAPTIC_DISABLED
     2.8  #undef SDL_LOADSO_DISABLED
     2.9  #undef SDL_THREADS_DISABLED
    2.10  #undef SDL_TIMERS_DISABLED
     3.1 --- a/src/haptic/dummy/SDL_syshaptic.c	Wed Jul 09 16:33:51 2008 +0000
     3.2 +++ b/src/haptic/dummy/SDL_syshaptic.c	Wed Jul 09 17:06:54 2008 +0000
     3.3 @@ -24,14 +24,12 @@
     3.4  #if defined(SDL_HAPTIC_DUMMY) || defined(SDL_HAPTIC_DISABLED)
     3.5  
     3.6  #include "SDL_haptic.h"
     3.7 -#include "../SDL_haptic_c.h"
     3.8  #include "../SDL_syshaptic.h"
     3.9  
    3.10  
    3.11  int
    3.12  SDL_SYS_HapticInit(void)
    3.13  {
    3.14 -   SDL_numhaptics = 0;
    3.15     return 0;
    3.16  }
    3.17  
    3.18 @@ -53,7 +51,7 @@
    3.19  
    3.20  
    3.21  int
    3.22 -SDL_JoystickIsHaptic(SDL_Joystick * joystick)
    3.23 +SDL_SYS_JoystickIsHaptic(SDL_Joystick * joystick)
    3.24  {
    3.25     return 0;
    3.26  }
    3.27 @@ -128,7 +126,7 @@
    3.28  SDL_SYS_HapticDestroyEffect(SDL_Haptic * haptic, struct haptic_effect * effect)
    3.29  {
    3.30     SDL_SetError("Logic error: No haptic devices available.");
    3.31 -   return -1;
    3.32 +   return;
    3.33  }
    3.34  
    3.35