mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-24 18:58:54 +01:00
internal/gamepad: refactoring
This commit is contained in:
parent
a347b618e0
commit
cd9477491d
@ -159,7 +159,7 @@ func (n *nativeGamepadXbox) hasOwnStandardLayoutMapping() bool {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (n *nativeGamepadXbox) isStandardAxisAvailableInOwnMapping(axis gamepaddb.StandardAxis) bool {
|
func (n *nativeGamepadXbox) isStandardAxisAvailableInOwnMapping(axis gamepaddb.StandardAxis) bool {
|
||||||
switch gamepaddb.StandardAxis(axis) {
|
switch axis {
|
||||||
case gamepaddb.StandardAxisLeftStickHorizontal,
|
case gamepaddb.StandardAxisLeftStickHorizontal,
|
||||||
gamepaddb.StandardAxisLeftStickVertical,
|
gamepaddb.StandardAxisLeftStickVertical,
|
||||||
gamepaddb.StandardAxisRightStickHorizontal,
|
gamepaddb.StandardAxisRightStickHorizontal,
|
||||||
@ -170,7 +170,7 @@ func (n *nativeGamepadXbox) isStandardAxisAvailableInOwnMapping(axis gamepaddb.S
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (n *nativeGamepadXbox) isStandardButtonAvailableInOwnMapping(button gamepaddb.StandardButton) bool {
|
func (n *nativeGamepadXbox) isStandardButtonAvailableInOwnMapping(button gamepaddb.StandardButton) bool {
|
||||||
switch gamepaddb.StandardButton(button) {
|
switch button {
|
||||||
case gamepaddb.StandardButtonFrontBottomLeft,
|
case gamepaddb.StandardButtonFrontBottomLeft,
|
||||||
gamepaddb.StandardButtonFrontBottomRight:
|
gamepaddb.StandardButtonFrontBottomRight:
|
||||||
return true
|
return true
|
||||||
|
Loading…
Reference in New Issue
Block a user