Mercurial > sdl-ios-xcode
changeset 2509:3b54b3a97046 gsoc2008_force_feedback
Dummy SDL haptic driver finally builds now.
author | Edgar Simo <bobbens@gmail.com> |
---|---|
date | Wed, 09 Jul 2008 17:06:54 +0000 |
parents | f23cee9e16fc |
children | e6ad7e678fca |
files | configure.in include/SDL_config.h.in src/haptic/dummy/SDL_syshaptic.c |
diffstat | 3 files changed, 7 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/configure.in Wed Jul 09 16:33:51 2008 +0000 +++ b/configure.in Wed Jul 09 17:06:54 2008 +0000 @@ -2580,10 +2580,11 @@ SOURCES="$SOURCES $srcdir/src/joystick/dummy/*.c" fi fi -if test x$enable_haptic = xyes; then - if test x$have_haptic != xyes; then +if test x$have_haptic != xyes; then + if test x$enable_haptic = xyes; then + AC_DEFINE(SDL_HAPTIC_DISABLED) + fi SOURCES="$SOURCES $srcdir/src/haptic/dummy/*.c" - fi fi if test x$have_cdrom != xyes; then if test x$enable_cdrom = xyes; then
--- a/include/SDL_config.h.in Wed Jul 09 16:33:51 2008 +0000 +++ b/include/SDL_config.h.in Wed Jul 09 17:06:54 2008 +0000 @@ -149,6 +149,7 @@ #undef SDL_EVENTS_DISABLED #undef SDL_FILE_DISABLED #undef SDL_JOYSTICK_DISABLED +#undef SDL_HAPTIC_DISABLED #undef SDL_LOADSO_DISABLED #undef SDL_THREADS_DISABLED #undef SDL_TIMERS_DISABLED
--- a/src/haptic/dummy/SDL_syshaptic.c Wed Jul 09 16:33:51 2008 +0000 +++ b/src/haptic/dummy/SDL_syshaptic.c Wed Jul 09 17:06:54 2008 +0000 @@ -24,14 +24,12 @@ #if defined(SDL_HAPTIC_DUMMY) || defined(SDL_HAPTIC_DISABLED) #include "SDL_haptic.h" -#include "../SDL_haptic_c.h" #include "../SDL_syshaptic.h" int SDL_SYS_HapticInit(void) { - SDL_numhaptics = 0; return 0; } @@ -53,7 +51,7 @@ int -SDL_JoystickIsHaptic(SDL_Joystick * joystick) +SDL_SYS_JoystickIsHaptic(SDL_Joystick * joystick) { return 0; } @@ -128,7 +126,7 @@ SDL_SYS_HapticDestroyEffect(SDL_Haptic * haptic, struct haptic_effect * effect) { SDL_SetError("Logic error: No haptic devices available."); - return -1; + return; }