Skip to content

Commit 1614e57

Browse files
committed
sdl: haptic: Add documentation for HapticEffect interface veandco#315
1 parent 0a5e32d commit 1614e57

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

sdl/haptic.go

+3
Original file line numberDiff line numberDiff line change
@@ -295,6 +295,7 @@ func (h *Haptic) Query() (uint32, error) {
295295
}
296296

297297
// EffectSupported reports whether an effect is supported by a haptic device.
298+
// Pass pointer to a Haptic struct (Constant|Periodic|Condition|Ramp|LeftRight|Custom) instead of HapticEffect union.
298299
// (https://wiki.libsdl.org/SDL_HapticEffectSupported)
299300
func (h *Haptic) EffectSupported(he iHapticEffect) (bool, error) {
300301
ret := int(C.SDL_HapticEffectSupported(
@@ -304,6 +305,7 @@ func (h *Haptic) EffectSupported(he iHapticEffect) (bool, error) {
304305
}
305306

306307
// NewEffect creates a new haptic effect on a specified device.
308+
// Pass pointer to a Haptic struct (Constant|Periodic|Condition|Ramp|LeftRight|Custom) instead of HapticEffect union.
307309
// (https://wiki.libsdl.org/SDL_HapticNewEffect)
308310
func (h *Haptic) NewEffect(he iHapticEffect) (int, error) {
309311
ret := int(C.SDL_HapticNewEffect(
@@ -313,6 +315,7 @@ func (h *Haptic) NewEffect(he iHapticEffect) (int, error) {
313315
}
314316

315317
// UpdateEffect updates the properties of an effect.
318+
// Pass pointer to a Haptic struct (Constant|Periodic|Condition|Ramp|LeftRight|Custom) instead of HapticEffect union.
316319
// (https://wiki.libsdl.org/SDL_HapticUpdateEffect)
317320
func (h *Haptic) UpdateEffect(effect int, data iHapticEffect) error {
318321
return errorFromInt(int(

0 commit comments

Comments
 (0)