inpututil: Make JustPressedTouches deterministic

This commit is contained in:
Hajime Hoshi 2018-04-30 02:43:08 +09:00
parent 8c258cce7d
commit 7a94b49a33

View File

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