mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-10 04:57:26 +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 {
|
||||
switch gamepaddb.StandardAxis(axis) {
|
||||
switch axis {
|
||||
case gamepaddb.StandardAxisLeftStickHorizontal,
|
||||
gamepaddb.StandardAxisLeftStickVertical,
|
||||
gamepaddb.StandardAxisRightStickHorizontal,
|
||||
@ -170,7 +170,7 @@ func (n *nativeGamepadXbox) isStandardAxisAvailableInOwnMapping(axis gamepaddb.S
|
||||
}
|
||||
|
||||
func (n *nativeGamepadXbox) isStandardButtonAvailableInOwnMapping(button gamepaddb.StandardButton) bool {
|
||||
switch gamepaddb.StandardButton(button) {
|
||||
switch button {
|
||||
case gamepaddb.StandardButtonFrontBottomLeft,
|
||||
gamepaddb.StandardButtonFrontBottomRight:
|
||||
return true
|
||||
|
Loading…
Reference in New Issue
Block a user