# HG changeset patch # User Edgar Simo # Date 1214995316 0 # Node ID 31444718601e5aefd6e1e33f8986e47c0fdb3b73 # Parent 10bc7aaf5114a5d90e9e661a24380e6ed8a0aae8 Updated the haptic dummy driver. diff -r 10bc7aaf5114 -r 31444718601e 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 */