Updated the haptic dummy driver. gsoc2008_force_feedback
authorEdgar Simo <bobbens@gmail.com>
Wed, 02 Jul 2008 10:41:56 +0000
branchgsoc2008_force_feedback
changeset 2492 31444718601e
parent 2491 10bc7aaf5114
child 2493 6a2482d4af81
Updated the haptic dummy driver.
src/haptic/dummy/SDL_syshaptic.c
--- a/src/haptic/dummy/SDL_syshaptic.c	Wed Jul 02 10:26:35 2008 +0000
+++ b/src/haptic/dummy/SDL_syshaptic.c	Wed Jul 02 10:41:56 2008 +0000
@@ -32,23 +32,45 @@
 SDL_SYS_HapticInit(void)
 {
    SDL_numhaptics = 0;
-   return (0);
+   return 0;
 }
 
 
 const char *
 SDL_SYS_HapticName(int index)
 {
-   SDL_SetError("Logic error: No haptic (force feedback) devices available");
-   return (NULL);
+   SDL_SetError("Logic error: No haptic devices available.");
+   return NULL;
 }
 
 
 int
 SDL_SYS_HapticOpen(SDL_Haptic * haptic)
 {
-   SDL_SetError("Logic error: No joysticks available");
-   return (-1);
+   SDL_SetError("Logic error: No haptic devices available.");
+   return -1;
+}
+
+
+int
+SDL_JoystickIsHaptic(SDL_Joystick * joystick)
+{
+   return 0;
+}
+
+
+int
+SDL_SYS_HapticOpenFromJoystick(SDL_Haptic * haptic, SDL_Joystick * joystick)
+{
+   SDL_SetError("Logic error: No haptic devices available.");
+   return -1;
+}
+
+
+int
+SDL_SYS_JoystickSameHaptic(SDL_Haptic * haptic, SDL_Joystick * joystick)
+{
+   return 0;
 }
 
 
@@ -66,4 +88,64 @@
 }
 
 
+int
+SDL_SYS_HapticNewEffect(SDL_Haptic * haptic,
+                        struct haptic_effect * effect,
+                        SDL_HapticEffect * base)
+{
+   SDL_SetError("Logic error: No haptic devices available.");
+   return -1;
+}
+
+
+int
+SDL_SYS_HapticUpdateEffect(SDL_Haptic * haptic,
+                           struct haptic_effect * effect,
+                           SDL_HapticEffect * data)
+{
+   SDL_SetError("Logic error: No haptic devices available.");
+   return -1;
+}
+
+
+int
+SDL_SYS_HapticRunEffect(SDL_Haptic * haptic, struct haptic_effect * effect)
+{
+   SDL_SetError("Logic error: No haptic devices available.");
+   return -1;
+}
+
+
+int
+SDL_SYS_HapticStopEffect(SDL_Haptic * haptic, struct haptic_effect * effect)
+{
+   SDL_SetError("Logic error: No haptic devices available.");
+   return -1;
+}
+
+
+void
+SDL_SYS_HapticDestroyEffect(SDL_Haptic * haptic, struct haptic_effect * effect)
+{
+   SDL_SetError("Logic error: No haptic devices available.");
+   return -1;
+}
+
+
+int
+SDL_SYS_HapticSetGain(SDL_Haptic * haptic, int gain)
+{
+   SDL_SetError("Logic error: No haptic devices available.");
+   return -1;
+}
+
+
+int
+SDL_SYS_HapticSetAutocenter(SDL_Haptic * haptic, int autocenter)
+{
+   SDL_SetError("Logic error: No haptic devices available.");
+   return -1;
+}
+
+
 #endif /* SDL_HAPTIC_DUMMY || SDL_HAPTIC_DISABLED */