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