Changed return value of internal function to shorten generic haptic source.

This commit is contained in:
Philipp Wiesemann 2013-07-20 11:01:03 +02:00
parent a663b9c637
commit 905c71baec

View file

@ -29,8 +29,7 @@
static int static int
SDL_SYS_LogicError(void) SDL_SYS_LogicError(void)
{ {
SDL_SetError("Logic error: No haptic devices available."); return SDL_SetError("Logic error: No haptic devices available.");
return 0;
} }
@ -52,8 +51,7 @@ SDL_SYS_HapticName(int index)
int int
SDL_SYS_HapticOpen(SDL_Haptic * haptic) SDL_SYS_HapticOpen(SDL_Haptic * haptic)
{ {
SDL_SYS_LogicError(); return SDL_SYS_LogicError();
return -1;
} }
@ -74,8 +72,7 @@ SDL_SYS_JoystickIsHaptic(SDL_Joystick * joystick)
int int
SDL_SYS_HapticOpenFromJoystick(SDL_Haptic * haptic, SDL_Joystick * joystick) SDL_SYS_HapticOpenFromJoystick(SDL_Haptic * haptic, SDL_Joystick * joystick)
{ {
SDL_SYS_LogicError(); return SDL_SYS_LogicError();
return -1;
} }
@ -104,8 +101,7 @@ int
SDL_SYS_HapticNewEffect(SDL_Haptic * haptic, SDL_SYS_HapticNewEffect(SDL_Haptic * haptic,
struct haptic_effect *effect, SDL_HapticEffect * base) struct haptic_effect *effect, SDL_HapticEffect * base)
{ {
SDL_SYS_LogicError(); return SDL_SYS_LogicError();
return -1;
} }
@ -114,8 +110,7 @@ SDL_SYS_HapticUpdateEffect(SDL_Haptic * haptic,
struct haptic_effect *effect, struct haptic_effect *effect,
SDL_HapticEffect * data) SDL_HapticEffect * data)
{ {
SDL_SYS_LogicError(); return SDL_SYS_LogicError();
return -1;
} }
@ -123,16 +118,14 @@ int
SDL_SYS_HapticRunEffect(SDL_Haptic * haptic, struct haptic_effect *effect, SDL_SYS_HapticRunEffect(SDL_Haptic * haptic, struct haptic_effect *effect,
Uint32 iterations) Uint32 iterations)
{ {
SDL_SYS_LogicError(); return SDL_SYS_LogicError();
return -1;
} }
int int
SDL_SYS_HapticStopEffect(SDL_Haptic * haptic, struct haptic_effect *effect) SDL_SYS_HapticStopEffect(SDL_Haptic * haptic, struct haptic_effect *effect)
{ {
SDL_SYS_LogicError(); return SDL_SYS_LogicError();
return -1;
} }
@ -148,47 +141,39 @@ int
SDL_SYS_HapticGetEffectStatus(SDL_Haptic * haptic, SDL_SYS_HapticGetEffectStatus(SDL_Haptic * haptic,
struct haptic_effect *effect) struct haptic_effect *effect)
{ {
SDL_SYS_LogicError(); return SDL_SYS_LogicError();
return -1;
} }
int int
SDL_SYS_HapticSetGain(SDL_Haptic * haptic, int gain) SDL_SYS_HapticSetGain(SDL_Haptic * haptic, int gain)
{ {
SDL_SYS_LogicError(); return SDL_SYS_LogicError();
return -1;
} }
int int
SDL_SYS_HapticSetAutocenter(SDL_Haptic * haptic, int autocenter) SDL_SYS_HapticSetAutocenter(SDL_Haptic * haptic, int autocenter)
{ {
SDL_SYS_LogicError(); return SDL_SYS_LogicError();
return -1;
} }
int int
SDL_SYS_HapticPause(SDL_Haptic * haptic) SDL_SYS_HapticPause(SDL_Haptic * haptic)
{ {
SDL_SYS_LogicError(); return SDL_SYS_LogicError();
return -1;
} }
int int
SDL_SYS_HapticUnpause(SDL_Haptic * haptic) SDL_SYS_HapticUnpause(SDL_Haptic * haptic)
{ {
SDL_SYS_LogicError(); return SDL_SYS_LogicError();
return -1;
} }
int int
SDL_SYS_HapticStopAll(SDL_Haptic * haptic) SDL_SYS_HapticStopAll(SDL_Haptic * haptic)
{ {
SDL_SYS_LogicError(); return SDL_SYS_LogicError();
return -1;
} }
#endif /* SDL_HAPTIC_DUMMY || SDL_HAPTIC_DISABLED */ #endif /* SDL_HAPTIC_DUMMY || SDL_HAPTIC_DISABLED */