Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Dummy SDL haptic driver finally builds now.
Browse files Browse the repository at this point in the history
  • Loading branch information
bobbens committed Jul 9, 2008
1 parent 752aa65 commit f36b472
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
7 changes: 4 additions & 3 deletions configure.in
Expand Up @@ -2580,10 +2580,11 @@ if test x$enable_joystick = xyes; then
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
Expand Down
1 change: 1 addition & 0 deletions include/SDL_config.h.in
Expand Up @@ -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
Expand Down
6 changes: 2 additions & 4 deletions src/haptic/dummy/SDL_syshaptic.c
Expand Up @@ -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;
}

Expand All @@ -53,7 +51,7 @@ SDL_SYS_HapticOpen(SDL_Haptic * haptic)


int
SDL_JoystickIsHaptic(SDL_Joystick * joystick)
SDL_SYS_JoystickIsHaptic(SDL_Joystick * joystick)
{
return 0;
}
Expand Down Expand Up @@ -128,7 +126,7 @@ void
SDL_SYS_HapticDestroyEffect(SDL_Haptic * haptic, struct haptic_effect * effect)
{
SDL_SetError("Logic error: No haptic devices available.");
return -1;
return;
}


Expand Down

0 comments on commit f36b472

Please sign in to comment.