swap A and B for switch

This commit is contained in:
Brandon 2020-11-02 16:56:28 -05:00
parent d93ed6c7db
commit f3f91a1d8e
1 changed files with 14 additions and 0 deletions

View File

@ -607,6 +607,7 @@ class Controls extends FlxActionSet
public function addDefaultGamepad(id):Void
{
#if !switch
addGamepadLiteral(id, [
Control.ACCEPT => [A],
Control.BACK => [B],
@ -617,6 +618,19 @@ class Controls extends FlxActionSet
Control.PAUSE => [START],
Control.RESET => [Y]
]);
#else
addGamepadLiteral(id, [
//Swap A and B for switch
Control.ACCEPT => [B],
Control.BACK => [A],
Control.UP => [DPAD_UP, LEFT_STICK_DIGITAL_UP],
Control.DOWN => [DPAD_DOWN, LEFT_STICK_DIGITAL_DOWN],
Control.LEFT => [DPAD_LEFT, LEFT_STICK_DIGITAL_LEFT],
Control.RIGHT => [DPAD_RIGHT, LEFT_STICK_DIGITAL_RIGHT],
Control.PAUSE => [START],
Control.RESET => [Y]
]);
#end
}
/**