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

Commit

Permalink
Changed return value of internal function to shorten generic haptic s…
Browse files Browse the repository at this point in the history
…ource.
  • Loading branch information
philippwiesemann committed Jul 20, 2013
1 parent 431f429 commit 4857f9d
Showing 1 changed file with 13 additions and 28 deletions.
41 changes: 13 additions & 28 deletions src/haptic/dummy/SDL_syshaptic.c
Expand Up @@ -29,8 +29,7 @@
static int
SDL_SYS_LogicError(void)
{
SDL_SetError("Logic error: No haptic devices available.");
return 0;
return SDL_SetError("Logic error: No haptic devices available.");
}


Expand All @@ -52,8 +51,7 @@ SDL_SYS_HapticName(int index)
int
SDL_SYS_HapticOpen(SDL_Haptic * haptic)
{
SDL_SYS_LogicError();
return -1;
return SDL_SYS_LogicError();
}


Expand All @@ -74,8 +72,7 @@ SDL_SYS_JoystickIsHaptic(SDL_Joystick * joystick)
int
SDL_SYS_HapticOpenFromJoystick(SDL_Haptic * haptic, SDL_Joystick * joystick)
{
SDL_SYS_LogicError();
return -1;
return SDL_SYS_LogicError();
}


Expand Down Expand Up @@ -104,8 +101,7 @@ int
SDL_SYS_HapticNewEffect(SDL_Haptic * haptic,
struct haptic_effect *effect, SDL_HapticEffect * base)
{
SDL_SYS_LogicError();
return -1;
return SDL_SYS_LogicError();
}


Expand All @@ -114,25 +110,22 @@ SDL_SYS_HapticUpdateEffect(SDL_Haptic * haptic,
struct haptic_effect *effect,
SDL_HapticEffect * data)
{
SDL_SYS_LogicError();
return -1;
return SDL_SYS_LogicError();
}


int
SDL_SYS_HapticRunEffect(SDL_Haptic * haptic, struct haptic_effect *effect,
Uint32 iterations)
{
SDL_SYS_LogicError();
return -1;
return SDL_SYS_LogicError();
}


int
SDL_SYS_HapticStopEffect(SDL_Haptic * haptic, struct haptic_effect *effect)
{
SDL_SYS_LogicError();
return -1;
return SDL_SYS_LogicError();
}


Expand All @@ -148,47 +141,39 @@ int
SDL_SYS_HapticGetEffectStatus(SDL_Haptic * haptic,
struct haptic_effect *effect)
{
SDL_SYS_LogicError();
return -1;
return SDL_SYS_LogicError();
}


int
SDL_SYS_HapticSetGain(SDL_Haptic * haptic, int gain)
{
SDL_SYS_LogicError();
return -1;
return SDL_SYS_LogicError();
}


int
SDL_SYS_HapticSetAutocenter(SDL_Haptic * haptic, int autocenter)
{
SDL_SYS_LogicError();
return -1;
return SDL_SYS_LogicError();
}

int
SDL_SYS_HapticPause(SDL_Haptic * haptic)
{
SDL_SYS_LogicError();
return -1;
return SDL_SYS_LogicError();
}

int
SDL_SYS_HapticUnpause(SDL_Haptic * haptic)
{
SDL_SYS_LogicError();
return -1;
return SDL_SYS_LogicError();
}

int
SDL_SYS_HapticStopAll(SDL_Haptic * haptic)
{
SDL_SYS_LogicError();
return -1;
return SDL_SYS_LogicError();
}



#endif /* SDL_HAPTIC_DUMMY || SDL_HAPTIC_DISABLED */

0 comments on commit 4857f9d

Please sign in to comment.