ebiten/internal/gamepaddb
Hajime Hoshi b7dd45c0e4 internal/gamepad: ignore the very first MotionEvent with 0 value for Android
On Android, MotionEvent with 0 values might come for axes when connecting
a gamepad, even though a user didn't touch any axes. This is problematic
especially for tirgger axes, where the default value should be -1.

This change fixes the issue by adding a new state `axesReady` to check
if an axis is really touched or not. If an axis is not touched yet,
a button value for a standard (trigger) button always returns 0.

This change also removes an old hack to initialize axis values for
triggers.

Closes #2598
2024-03-21 22:28:48 +09:00
..
button.go internal/gamepaddb: move driver.StandardGamepadButton to gamepaddb.StandardButton 2022-02-05 23:11:09 +09:00
gamecontrollerdb.txt internal/gamepaddb: update the database 2024-02-21 20:36:46 +09:00
gamepaddb_test.go all: fix typos (#2558) 2023-01-28 19:06:38 +09:00
gamepaddb.go internal/gamepad: ignore the very first MotionEvent with 0 value for Android 2024-03-21 22:28:48 +09:00
sdl.go internal/gamepaddb: enable the database for Android 2022-09-09 22:20:39 +09:00