[gnome-games] gamepad-mapping-builder: Use more ASCII art in the comment



commit 9be02b7179b81653ccf45da3a3da691515a7e3cf
Author: Alexander Mikhaylenko <alexm gnome org>
Date:   Fri Feb 28 01:50:03 2020 +0500

    gamepad-mapping-builder: Use more ASCII art in the comment

 src/gamepad/gamepad-mapping-builder.vala | 18 ++++++++++++------
 1 file changed, 12 insertions(+), 6 deletions(-)
---
diff --git a/src/gamepad/gamepad-mapping-builder.vala b/src/gamepad/gamepad-mapping-builder.vala
index 2550f708..487f8068 100644
--- a/src/gamepad/gamepad-mapping-builder.vala
+++ b/src/gamepad/gamepad-mapping-builder.vala
@@ -6,14 +6,20 @@ private class Games.GamepadMappingBuilder : Object {
                string source;
        }
 
-       // SDL strings are based on XBox button order unlike libretro, e.g.
-       // A is the bottom button rather than the right one.
+       // SDL strings are based on Xbox button order:
        //
-       // At the same time, /usr/include/linux/input-event-codes.h uses XBox order
-       // for A and B, and Nintendo order for X and Y: X is the top button, and Y
-       // is the left one.
+       //   (Y)
+       // (X) (B)
+       //   (A)
        //
-       // As a result, we swap X and Y again to match XBox order.
+       // At the same time, /usr/include/linux/input-event-codes.h uses
+       // Xbox order for A and B, and Nintendo/libretro order for X and Y:
+       //
+       //   (Y)
+       // (X) (B)
+       //   (A)
+       //
+       // As a result, we swap X and Y buttons to match Xbox order
        private const GamepadInputSource[] INPUT_SOURCES = {
                { { EventCode.EV_ABS, EventCode.ABS_X }, "leftx" },
                { { EventCode.EV_ABS, EventCode.ABS_Y }, "lefty" },


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]