inpututil: add comments

This commit is contained in:
Hajime Hoshi 2024-10-27 02:45:57 +09:00
parent dc41960d3b
commit 0942fbb4d7

View File

@ -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