mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-10 04:57:26 +01:00
input: Bug fix: Touches requries lock
This commit is contained in:
parent
683c692a5b
commit
05104744d3
@ -105,6 +105,8 @@ func (i *input) IsGamepadButtonPressed(id int, button GamepadButton) bool {
|
||||
}
|
||||
|
||||
func (in *input) Touches() []Touch {
|
||||
i.m.RLock()
|
||||
defer i.m.RUnlock()
|
||||
t := make([]Touch, len(in.touches))
|
||||
for i := 0; i < len(t); i++ {
|
||||
t[i] = &in.touches[i]
|
||||
|
Loading…
Reference in New Issue
Block a user