From 55447679ee0ca130c1fb9df753f2ef022515e1ac Mon Sep 17 00:00:00 2001 From: Hajime Hoshi Date: Tue, 12 Apr 2022 00:05:55 +0900 Subject: [PATCH] examples/vibrate: bug fix: touches didn't work correctly --- examples/vibrate/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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{