Skip to content

Commit 9b73d5a

Browse files
committed
haptic: Rename iHapticEffect interface to HapticEffect
Signed-off-by: Lilis Iskandar <[email protected]>
1 parent 7b69347 commit 9b73d5a

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

sdl/haptic.go

+4-6
Original file line numberDiff line numberDiff line change
@@ -169,9 +169,7 @@ func (he *HapticCustom) cHapticEffect() *C.SDL_HapticEffect {
169169

170170
// HapticEffect union that contains the generic template for any haptic effect.
171171
// (https://wiki.libsdl.org/SDL_HapticEffect)
172-
type HapticEffect C.SDL_HapticEffect
173-
174-
type iHapticEffect interface {
172+
type HapticEffect interface {
175173
cHapticEffect() *C.SDL_HapticEffect
176174
}
177175

@@ -297,7 +295,7 @@ func (h *Haptic) Query() (uint32, error) {
297295
// EffectSupported reports whether an effect is supported by a haptic device.
298296
// Pass pointer to a Haptic struct (Constant|Periodic|Condition|Ramp|LeftRight|Custom) instead of HapticEffect union.
299297
// (https://wiki.libsdl.org/SDL_HapticEffectSupported)
300-
func (h *Haptic) EffectSupported(he iHapticEffect) (bool, error) {
298+
func (h *Haptic) EffectSupported(he HapticEffect) (bool, error) {
301299
ret := int(C.SDL_HapticEffectSupported(
302300
h.cptr(),
303301
he.cHapticEffect()))
@@ -307,7 +305,7 @@ func (h *Haptic) EffectSupported(he iHapticEffect) (bool, error) {
307305
// NewEffect creates a new haptic effect on a specified device.
308306
// Pass pointer to a Haptic struct (Constant|Periodic|Condition|Ramp|LeftRight|Custom) instead of HapticEffect union.
309307
// (https://wiki.libsdl.org/SDL_HapticNewEffect)
310-
func (h *Haptic) NewEffect(he iHapticEffect) (int, error) {
308+
func (h *Haptic) NewEffect(he HapticEffect) (int, error) {
311309
ret := int(C.SDL_HapticNewEffect(
312310
h.cptr(),
313311
he.cHapticEffect()))
@@ -317,7 +315,7 @@ func (h *Haptic) NewEffect(he iHapticEffect) (int, error) {
317315
// UpdateEffect updates the properties of an effect.
318316
// Pass pointer to a Haptic struct (Constant|Periodic|Condition|Ramp|LeftRight|Custom) instead of HapticEffect union.
319317
// (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 {
321319
return errorFromInt(int(
322320
C.SDL_HapticUpdateEffect(
323321
h.cptr(),

0 commit comments

Comments
 (0)