Implement some preparation code for go2cpp

Updates #744
This commit is contained in:
Hajime Hoshi
2020-11-22 18:22:52 +09:00
parent 912e13071f
commit 5897e1ab7c
5 changed files with 57 additions and 33 deletions

View File

@@ -244,6 +244,9 @@ func (i *Input) setMouseCursor(x, y int) {
func (i *Input) UpdateGamepads() {
nav := js.Global().Get("navigator")
if !nav.Truthy() {
return
}
if !nav.Get("getGamepads").Truthy() {
return
}