mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-26 03:38:55 +01:00
parent
d6e257084d
commit
8aeda9f543
@ -140,8 +140,7 @@ func (i *inputState) update() {
|
|||||||
if _, ok := i.gamepadButtonDurations[id]; !ok {
|
if _, ok := i.gamepadButtonDurations[id]; !ok {
|
||||||
i.gamepadButtonDurations[id] = make([]int, ebiten.GamepadButtonMax+1)
|
i.gamepadButtonDurations[id] = make([]int, ebiten.GamepadButtonMax+1)
|
||||||
}
|
}
|
||||||
n := ebiten.GamepadButtonNum(id)
|
for b := ebiten.GamepadButton(0); b <= ebiten.GamepadButtonMax; b++ {
|
||||||
for b := ebiten.GamepadButton(0); b < ebiten.GamepadButton(n); b++ {
|
|
||||||
if ebiten.IsGamepadButtonPressed(id, b) {
|
if ebiten.IsGamepadButtonPressed(id, b) {
|
||||||
i.gamepadButtonDurations[id][b]++
|
i.gamepadButtonDurations[id][b]++
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user