Mercurial > sdl-ios-xcode
changeset 2492:31444718601e gsoc2008_force_feedback
Updated the haptic dummy driver.
author | Edgar Simo <bobbens@gmail.com> |
---|---|
date | Wed, 02 Jul 2008 10:41:56 +0000 |
parents | 10bc7aaf5114 |
children | 6a2482d4af81 |
files | src/haptic/dummy/SDL_syshaptic.c |
diffstat | 1 files changed, 87 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- 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 */