mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-04-27 17:54:18 +00:00
Made SDL_HapticEffect const in the API
Also added some additional parameter validation to haptic effect functions
This commit is contained in:
@@ -1090,7 +1090,7 @@ extern DECLSPEC int SDLCALL SDL_GetNumHapticAxes(SDL_Haptic *haptic);
|
||||
* \sa SDL_CreateHapticEffect
|
||||
* \sa SDL_GetHapticFeatures
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_HapticEffectSupported(SDL_Haptic *haptic, SDL_HapticEffect *effect);
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_HapticEffectSupported(SDL_Haptic *haptic, const SDL_HapticEffect *effect);
|
||||
|
||||
/**
|
||||
* Create a new haptic effect on a specified device.
|
||||
@@ -1107,7 +1107,7 @@ extern DECLSPEC SDL_bool SDLCALL SDL_HapticEffectSupported(SDL_Haptic *haptic, S
|
||||
* \sa SDL_RunHapticEffect
|
||||
* \sa SDL_UpdateHapticEffect
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_CreateHapticEffect(SDL_Haptic *haptic, SDL_HapticEffect *effect);
|
||||
extern DECLSPEC int SDLCALL SDL_CreateHapticEffect(SDL_Haptic *haptic, const SDL_HapticEffect *effect);
|
||||
|
||||
/**
|
||||
* Update the properties of an effect.
|
||||
@@ -1130,7 +1130,7 @@ extern DECLSPEC int SDLCALL SDL_CreateHapticEffect(SDL_Haptic *haptic, SDL_Hapti
|
||||
* \sa SDL_CreateHapticEffect
|
||||
* \sa SDL_RunHapticEffect
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_UpdateHapticEffect(SDL_Haptic *haptic, int effect, SDL_HapticEffect *data);
|
||||
extern DECLSPEC int SDLCALL SDL_UpdateHapticEffect(SDL_Haptic *haptic, int effect, const SDL_HapticEffect *data);
|
||||
|
||||
/**
|
||||
* Run the haptic effect on its associated haptic device.
|
||||
|
||||
Reference in New Issue
Block a user