mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-10 04:57:26 +01:00
internal/uidriver/mobile: stop requesting a frame on gamepads
In general, it is impossible to treat gamepad inputtings as events. With FPSModeVsyncOffMinimum, the application cannot update with gamepad inputtings.
This commit is contained in:
parent
577b4eed0d
commit
ee1b5e2044
@ -22,9 +22,6 @@ import (
|
||||
// UpdateGamepads is called when the gamepad states are given from outside like Android.
|
||||
func (u *UserInterface) UpdateGamepads(gamepads []Gamepad) {
|
||||
u.input.updateGamepadsFromOutside(gamepads)
|
||||
if u.fpsMode == driver.FPSModeVsyncOffMinimum {
|
||||
u.renderRequester.RequestRenderIfNeeded()
|
||||
}
|
||||
}
|
||||
|
||||
func (i *Input) updateGamepadsFromOutside(gamepads []Gamepad) {
|
||||
|
2
run.go
2
run.go
@ -362,7 +362,7 @@ const (
|
||||
// FPSModeVsyncOffMinimum is useful for relatively static applications to save battery power.
|
||||
//
|
||||
// In FPSModeVsyncOffMinimum, the game's Update and Draw are called only when
|
||||
// 1) new inputting is detected, or 2) ScheduleFrame is called.
|
||||
// 1) new inputting except for gamepads is detected, or 2) ScheduleFrame is called.
|
||||
// In FPSModeVsyncOffMinimum, TPS is SyncWithFPS no matter what TPS is specified at SetMaxTPS.
|
||||
FPSModeVsyncOffMinimum FPSModeType = driver.FPSModeVsyncOffMinimum
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user