mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2026-04-23 00:07:15 +08:00
inpututil: Make JustPressedTouches deterministic
This commit is contained in:
@@ -18,6 +18,8 @@
|
||||
package inpututil
|
||||
|
||||
import (
|
||||
"sort"
|
||||
|
||||
"github.com/hajimehoshi/ebiten"
|
||||
"github.com/hajimehoshi/ebiten/internal/hooks"
|
||||
"github.com/hajimehoshi/ebiten/internal/sync"
|
||||
@@ -261,6 +263,7 @@ func JustPressedTouches() []int {
|
||||
}
|
||||
}
|
||||
theInputState.m.RUnlock()
|
||||
sort.Ints(ids)
|
||||
return ids
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user