mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-25 19:28:57 +01:00
internal/uidriver/mobile: Reduce calling make
This commit is contained in:
parent
efdb31a524
commit
c3b4b92fa2
@ -205,14 +205,14 @@ func (i *Input) update(keys map[driver.Key]struct{}, runes []rune, touches []Tou
|
|||||||
i.keys[k] = struct{}{}
|
i.keys[k] = struct{}{}
|
||||||
}
|
}
|
||||||
|
|
||||||
i.runes = make([]rune, len(runes))
|
i.runes = i.runes[:0]
|
||||||
copy(i.runes, runes)
|
i.runes = append(i.runes, runes...)
|
||||||
|
|
||||||
i.touches = make([]Touch, len(touches))
|
i.touches = i.touches[:0]
|
||||||
copy(i.touches, touches)
|
i.touches = append(i.touches, touches...)
|
||||||
|
|
||||||
i.gamepads = make([]Gamepad, len(gamepads))
|
i.gamepads = i.gamepads[:0]
|
||||||
copy(i.gamepads, gamepads)
|
i.gamepads = append(i.gamepads, gamepads...)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (i *Input) resetForFrame() {
|
func (i *Input) resetForFrame() {
|
||||||
|
Loading…
Reference in New Issue
Block a user