From 0942fbb4d7e3a244a6d841272876a20b7d37feff Mon Sep 17 00:00:00 2001 From: Hajime Hoshi Date: Sun, 27 Oct 2024 02:45:57 +0900 Subject: [PATCH] inpututil: add comments --- inpututil/inpututil.go | 1 + 1 file changed, 1 insertion(+) diff --git a/inpututil/inpututil.go b/inpututil/inpututil.go index 62ff1a1d0..a56d3a651 100644 --- a/inpututil/inpututil.go +++ b/inpututil/inpututil.go @@ -640,6 +640,7 @@ func AppendJustReleasedTouchIDs(touchIDs []ebiten.TouchID) []ebiten.TouchID { defer theInputState.m.RUnlock() origLen := len(touchIDs) + // Iterate prevTouchStates instead of touchStates since touchStates doesn't have released touches. for id, state := range theInputState.prevTouchStates { if state.duration == 0 { continue