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

Commit

Permalink
Updated the haptic dummy driver.
Browse files Browse the repository at this point in the history
  • Loading branch information
bobbens committed Jul 2, 2008
1 parent 8884a50 commit 72d961a
Showing 1 changed file with 87 additions and 5 deletions.
92 changes: 87 additions & 5 deletions src/haptic/dummy/SDL_syshaptic.c
Expand Up @@ -32,23 +32,45 @@ int
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;
}


Expand All @@ -66,4 +88,64 @@ SDL_SYS_HapticQuit(void)
}


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 */

0 comments on commit 72d961a

Please sign in to comment.