mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-10 04:57:26 +01:00
examples/gamepad: bug fix: correct iteration start button in gamepad example (#2730)
Start iterating at zero instead of gamepad id (which is usually 0).
This commit is contained in:
parent
a9b2f5f9ca
commit
7fe89b173b
@ -67,7 +67,7 @@ func (g *Game) Update() error {
|
||||
}
|
||||
|
||||
maxButton := ebiten.GamepadButton(ebiten.GamepadButtonCount(id))
|
||||
for b := ebiten.GamepadButton(id); b < maxButton; b++ {
|
||||
for b := ebiten.GamepadButton(0); b < maxButton; b++ {
|
||||
if ebiten.IsGamepadButtonPressed(id, b) {
|
||||
g.pressedButtons[id] = append(g.pressedButtons[id], strconv.Itoa(int(b)))
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user