internal/uidriver: Optimization

This commit is contained in:
Hajime Hoshi 2021-01-24 23:59:28 +09:00
parent 514904392c
commit 40e662d672

View File

@ -293,7 +293,9 @@ func (i *Input) updateGamepads() {
return return
} }
i.gamepads = map[driver.GamepadID]gamepad{} for k := range i.gamepads {
delete(i.gamepads, k)
}
gamepads := nav.Call("getGamepads") gamepads := nav.Call("getGamepads")
l := gamepads.Length() l := gamepads.Length()