internal/ui: update gamepads for PS5

This commit is contained in:
Hajime Hoshi 2024-10-19 22:43:14 +09:00
parent c3ea539cdb
commit 0af6497017

View File

@ -16,8 +16,23 @@
package ui package ui
import (
"github.com/hajimehoshi/ebiten/v2/internal/gamepad"
)
func (u *UserInterface) updateInputState() error { func (u *UserInterface) updateInputState() error {
// TODO: Implement this var err error
u.mainThread.Call(func() {
err = u.updateInputStateImpl()
})
return err
}
// updateInputStateImpl must be called from the main thread.
func (u *UserInterface) updateInputStateImpl() error {
if err := gamepad.Update(); err != nil {
return err
}
return nil return nil
} }