mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-25 11:18:54 +01:00
inpututil: revert inpututil changes
This reverts these commits: *0fd630100f
*798b60b67c
*5bb22d2bcf
Reason: this change is no longer needed. Updates #2027 Updates #2039
This commit is contained in:
parent
07a7aca1b3
commit
03bf60cd92
@ -137,10 +137,10 @@ func (i *inputState) update() {
|
||||
for _, id := range i.gamepadIDsBuf {
|
||||
i.gamepadIDs[id] = struct{}{}
|
||||
|
||||
n := ebiten.GamepadButtonNum(id)
|
||||
if n != len(i.gamepadButtonDurations[id]) {
|
||||
i.gamepadButtonDurations[id] = make([]int, n)
|
||||
if _, ok := i.gamepadButtonDurations[id]; !ok {
|
||||
i.gamepadButtonDurations[id] = make([]int, ebiten.GamepadButtonMax+1)
|
||||
}
|
||||
n := ebiten.GamepadButtonNum(id)
|
||||
for b := ebiten.GamepadButton(0); b < ebiten.GamepadButton(n); b++ {
|
||||
if ebiten.IsGamepadButtonPressed(id, b) {
|
||||
i.gamepadButtonDurations[id][b]++
|
||||
|
Loading…
Reference in New Issue
Block a user