mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2025-01-30 20:44:28 +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 {
|
for _, id := range i.gamepadIDsBuf {
|
||||||
i.gamepadIDs[id] = struct{}{}
|
i.gamepadIDs[id] = struct{}{}
|
||||||
|
|
||||||
n := ebiten.GamepadButtonNum(id)
|
if _, ok := i.gamepadButtonDurations[id]; !ok {
|
||||||
if n != len(i.gamepadButtonDurations[id]) {
|
i.gamepadButtonDurations[id] = make([]int, ebiten.GamepadButtonMax+1)
|
||||||
i.gamepadButtonDurations[id] = make([]int, n)
|
|
||||||
}
|
}
|
||||||
|
n := ebiten.GamepadButtonNum(id)
|
||||||
for b := ebiten.GamepadButton(0); b < ebiten.GamepadButton(n); 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]++
|
||||||
|
Loading…
Reference in New Issue
Block a user