mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-10 04:57:26 +01:00
inpututil: revert commits
This reverts these commits: *700d478665
*e583d28a82
*4749fc4193
Reason: This fix is not needed for 2.2. See #2039
This commit is contained in:
parent
700d478665
commit
6f87e49bb8
@ -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