internal/gamepad: rename variables

This commit is contained in:
Hajime Hoshi 2023-03-03 21:17:47 +09:00
parent 9d1ea0a91a
commit b278e5521f

View File

@ -284,14 +284,14 @@ func (g *Gamepad) IsStandardLayoutAvailable() bool {
} }
// IsStandardAxisAvailable is concurrent safe. // IsStandardAxisAvailable is concurrent safe.
func (g *Gamepad) IsStandardAxisAvailable(button gamepaddb.StandardAxis) bool { func (g *Gamepad) IsStandardAxisAvailable(axis gamepaddb.StandardAxis) bool {
g.m.Lock() g.m.Lock()
defer g.m.Unlock() defer g.m.Unlock()
if gamepaddb.HasStandardLayoutMapping(g.sdlID) { if gamepaddb.HasStandardLayoutMapping(g.sdlID) {
return gamepaddb.HasStandardAxis(g.sdlID, button) return gamepaddb.HasStandardAxis(g.sdlID, axis)
} }
return g.native.isStandardAxisAvailableInOwnMapping(button) return g.native.isStandardAxisAvailableInOwnMapping(axis)
} }
// IsStandardButtonAvailable is concurrent safe. // IsStandardButtonAvailable is concurrent safe.