internal/ui: handle gamepad errors

This commit is contained in:
Hajime Hoshi 2022-06-24 20:20:49 +09:00
parent 0cd43bd081
commit f1037d8bff
3 changed files with 9 additions and 3 deletions

View File

@ -203,6 +203,8 @@ func (i *Input) update(window *glfw.Window, context *context) error {
i.cursorX, i.cursorY = int(cx), int(cy)
}
gamepad.Update()
if err := gamepad.Update(); err != nil {
return err
}
return nil
}

View File

@ -290,7 +290,9 @@ func (u *userInterfaceImpl) updateImpl(force bool) error {
return nil
}
gamepad.Update()
if err := gamepad.Update(); err != nil {
return err
}
u.input.updateForGo2Cpp()
a := u.DeviceScaleFactor()

View File

@ -79,7 +79,9 @@ func (u *userInterfaceImpl) Update() error {
return nil
}
gamepad.Update()
if err := gamepad.Update(); err != nil {
return err
}
renderCh <- struct{}{}
go func() {