@@ -169,9 +169,7 @@ func (he *HapticCustom) cHapticEffect() *C.SDL_HapticEffect {
169
169
170
170
// HapticEffect union that contains the generic template for any haptic effect.
171
171
// (https://wiki.libsdl.org/SDL_HapticEffect)
172
- type HapticEffect C.SDL_HapticEffect
173
-
174
- type iHapticEffect interface {
172
+ type HapticEffect interface {
175
173
cHapticEffect () * C.SDL_HapticEffect
176
174
}
177
175
@@ -297,7 +295,7 @@ func (h *Haptic) Query() (uint32, error) {
297
295
// EffectSupported reports whether an effect is supported by a haptic device.
298
296
// Pass pointer to a Haptic struct (Constant|Periodic|Condition|Ramp|LeftRight|Custom) instead of HapticEffect union.
299
297
// (https://wiki.libsdl.org/SDL_HapticEffectSupported)
300
- func (h * Haptic ) EffectSupported (he iHapticEffect ) (bool , error ) {
298
+ func (h * Haptic ) EffectSupported (he HapticEffect ) (bool , error ) {
301
299
ret := int (C .SDL_HapticEffectSupported (
302
300
h .cptr (),
303
301
he .cHapticEffect ()))
@@ -307,7 +305,7 @@ func (h *Haptic) EffectSupported(he iHapticEffect) (bool, error) {
307
305
// NewEffect creates a new haptic effect on a specified device.
308
306
// Pass pointer to a Haptic struct (Constant|Periodic|Condition|Ramp|LeftRight|Custom) instead of HapticEffect union.
309
307
// (https://wiki.libsdl.org/SDL_HapticNewEffect)
310
- func (h * Haptic ) NewEffect (he iHapticEffect ) (int , error ) {
308
+ func (h * Haptic ) NewEffect (he HapticEffect ) (int , error ) {
311
309
ret := int (C .SDL_HapticNewEffect (
312
310
h .cptr (),
313
311
he .cHapticEffect ()))
@@ -317,7 +315,7 @@ func (h *Haptic) NewEffect(he iHapticEffect) (int, error) {
317
315
// UpdateEffect updates the properties of an effect.
318
316
// Pass pointer to a Haptic struct (Constant|Periodic|Condition|Ramp|LeftRight|Custom) instead of HapticEffect union.
319
317
// (https://wiki.libsdl.org/SDL_HapticUpdateEffect)
320
- func (h * Haptic ) UpdateEffect (effect int , data iHapticEffect ) error {
318
+ func (h * Haptic ) UpdateEffect (effect int , data HapticEffect ) error {
321
319
return errorFromInt (int (
322
320
C .SDL_HapticUpdateEffect (
323
321
h .cptr (),
0 commit comments