diff --git a/examples/vibrate/main.go b/examples/vibrate/main.go index c4e627c9d..4f6605ebb 100644 --- a/examples/vibrate/main.go +++ b/examples/vibrate/main.go @@ -39,7 +39,7 @@ type Game struct { func (g *Game) Update() error { g.touchIDs = g.touchIDs[:0] - g.touchIDs = inpututil.AppendJustPressedTouchIDs(g.touchIDs) + g.touchIDs = inpututil.AppendJustPressedTouchIDs(g.touchIDs[:0]) if len(g.touchIDs) > 0 { g.touchCounter++ op := &ebiten.VibrateOptions{