mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2025-01-27 03:02:49 +01:00
inpututil: Make JustPressedTouches deterministic
This commit is contained in:
parent
8c258cce7d
commit
7a94b49a33
@ -18,6 +18,8 @@
|
|||||||
package inpututil
|
package inpututil
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"sort"
|
||||||
|
|
||||||
"github.com/hajimehoshi/ebiten"
|
"github.com/hajimehoshi/ebiten"
|
||||||
"github.com/hajimehoshi/ebiten/internal/hooks"
|
"github.com/hajimehoshi/ebiten/internal/hooks"
|
||||||
"github.com/hajimehoshi/ebiten/internal/sync"
|
"github.com/hajimehoshi/ebiten/internal/sync"
|
||||||
@ -261,6 +263,7 @@ func JustPressedTouches() []int {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
theInputState.m.RUnlock()
|
theInputState.m.RUnlock()
|
||||||
|
sort.Ints(ids)
|
||||||
return ids
|
return ids
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user