diff --git a/examples/blocks/blocks/gamepad.go b/examples/blocks/blocks/gamepad.go index e2aebcac7..7b9207ec5 100644 --- a/examples/blocks/blocks/gamepad.go +++ b/examples/blocks/blocks/gamepad.go @@ -95,7 +95,7 @@ func (c *gamepadConfig) initializeIfNeeded() { c.defaultAxesValues = map[int]float64{} na := ebiten.GamepadAxisNum(c.gamepadID) for a := 0; a < na; a++ { - c.defaultAxesValues[a] = ebiten.GamepadAxis(c.gamepadID, a) + c.defaultAxesValues[a] = ebiten.GamepadAxisValue(c.gamepadID, a) } } } @@ -136,7 +136,7 @@ func (c *gamepadConfig) Scan(b virtualGamepadButton) bool { na := ebiten.GamepadAxisNum(c.gamepadID) for a := 0; a < na; a++ { - v := ebiten.GamepadAxis(c.gamepadID, a) + v := ebiten.GamepadAxisValue(c.gamepadID, a) const delta = 0.25 // Check |v| < 1.0 because there is a bug that a button returns @@ -177,7 +177,7 @@ func (c *gamepadConfig) IsButtonPressed(b virtualGamepadButton) bool { a, ok := c.axes[b] if ok { - v := ebiten.GamepadAxis(c.gamepadID, a.id) + v := ebiten.GamepadAxisValue(c.gamepadID, a.id) if a.positive { return axisThreshold <= v && v <= 1.0 } else { diff --git a/examples/gamepad/main.go b/examples/gamepad/main.go index 78b5f5016..828cfaf9b 100644 --- a/examples/gamepad/main.go +++ b/examples/gamepad/main.go @@ -64,7 +64,7 @@ func (g *Game) Update() error { for id := range g.gamepadIDs { maxAxis := ebiten.GamepadAxisNum(id) for a := 0; a < maxAxis; a++ { - v := ebiten.GamepadAxis(id, a) + v := ebiten.GamepadAxisValue(id, a) g.axes[id] = append(g.axes[id], fmt.Sprintf("%d:%0.2f", a, v)) } maxButton := ebiten.GamepadButton(ebiten.GamepadButtonNum(id))