[retro-gtk] controller-codes: Add count values



commit 19fa712c2627b2403993244e523be94447af467e
Author: Adrien Plazas <kekun plazas laposte net>
Date:   Sun Oct 29 20:05:40 2017 +0100

    controller-codes: Add count values

 retro-gtk/retro-controller-codes.c |    5 +++++
 retro-gtk/retro-controller-codes.h |   12 +++++++++++-
 2 files changed, 16 insertions(+), 1 deletions(-)
---
diff --git a/retro-gtk/retro-controller-codes.c b/retro-gtk/retro-controller-codes.c
index 425fc05..420a003 100644
--- a/retro-gtk/retro-controller-codes.c
+++ b/retro-gtk/retro-controller-codes.c
@@ -54,6 +54,7 @@ retro_mouse_id_get_type (void)
       { RETRO_MOUSE_ID_MIDDLE, "RETRO_MOUSE_ID_MIDDLE", "middle" },
       { RETRO_MOUSE_ID_HORIZ_WHEELUP, "RETRO_MOUSE_ID_HORIZ_WHEELUP", "horiz-wheelup" },
       { RETRO_MOUSE_ID_HORIZ_WHEELDOWN, "RETRO_MOUSE_ID_HORIZ_WHEELDOWN", "horiz-wheeldown" },
+      { RETRO_MOUSE_ID_COUNT, "RETRO_MOUSE_ID_COUNT", "count" },
       { 0, NULL, NULL },
     };
     GType type;
@@ -80,6 +81,7 @@ retro_lightgun_id_get_type (void)
       { RETRO_LIGHTGUN_ID_TURBO, "RETRO_LIGHTGUN_ID_TURBO", "turbo" },
       { RETRO_LIGHTGUN_ID_PAUSE, "RETRO_LIGHTGUN_ID_PAUSE", "pause" },
       { RETRO_LIGHTGUN_ID_START, "RETRO_LIGHTGUN_ID_START", "start" },
+      { RETRO_LIGHTGUN_ID_COUNT, "RETRO_LIGHTGUN_ID_COUNT", "count" },
       { 0, NULL, NULL },
     };
     GType type;
@@ -101,6 +103,7 @@ retro_analog_id_get_type (void)
     static const GEnumValue values[] = {
       { RETRO_ANALOG_ID_X, "RETRO_ANALOG_ID_X", "x" },
       { RETRO_ANALOG_ID_Y, "RETRO_ANALOG_ID_Y", "y" },
+      { RETRO_ANALOG_ID_COUNT, "RETRO_ANALOG_ID_COUNT", "count" },
       { 0, NULL, NULL },
     };
     GType type;
@@ -122,6 +125,7 @@ retro_analog_index_get_type (void)
     static const GEnumValue values[] = {
       { RETRO_ANALOG_INDEX_LEFT, "RETRO_ANALOG_INDEX_LEFT", "left" },
       { RETRO_ANALOG_INDEX_RIGHT, "RETRO_ANALOG_INDEX_RIGHT", "right" },
+      { RETRO_ANALOG_INDEX_COUNT, "RETRO_ANALOG_INDEX_COUNT", "count" },
       { 0, NULL, NULL },
     };
     GType type;
@@ -144,6 +148,7 @@ retro_pointer_id_get_type (void)
       { RETRO_POINTER_ID_X, "RETRO_POINTER_ID_X", "x" },
       { RETRO_POINTER_ID_Y, "RETRO_POINTER_ID_Y", "y" },
       { RETRO_POINTER_ID_PRESSED, "RETRO_POINTER_ID_PRESSED", "pressed" },
+      { RETRO_POINTER_ID_COUNT, "RETRO_POINTER_ID_COUNT", "count" },
       { 0, NULL, NULL },
     };
     GType type;
diff --git a/retro-gtk/retro-controller-codes.h b/retro-gtk/retro-controller-codes.h
index b66a777..39df383 100644
--- a/retro-gtk/retro-controller-codes.h
+++ b/retro-gtk/retro-controller-codes.h
@@ -33,7 +33,7 @@ GType retro_joypad_id_get_type (void) G_GNUC_CONST;
  * @RETRO_JOYPAD_ID_R2: the second right shoulder button
  * @RETRO_JOYPAD_ID_L3: the left thumb button
  * @RETRO_JOYPAD_ID_R3: the right thumb button
- * @RETRO_JOYPAD_ID_COUNT: the number of buttons
+ * @RETRO_JOYPAD_ID_COUNT: the number of ids
  *
  * Represents the buttons for the Libretro gamepad. The available buttons are
  * the same as the W3C Standard Gamepad, the SDL GameController and many other
@@ -78,6 +78,7 @@ GType retro_mouse_id_get_type (void) G_GNUC_CONST;
  * @RETRO_MOUSE_ID_MIDDLE: the middle button of a mouse
  * @RETRO_MOUSE_ID_HORIZ_WHEELUP: the horizontal up direction of a mouse wheel
  * @RETRO_MOUSE_ID_HORIZ_WHEELDOWN: the horizontal down direction of a mouse wheel
+ * @RETRO_MOUSE_ID_COUNT: the number of ids
  *
  * Represents the inputs for the Libretro mouse.
  */
@@ -92,6 +93,7 @@ typedef enum
   RETRO_MOUSE_ID_MIDDLE,
   RETRO_MOUSE_ID_HORIZ_WHEELUP,
   RETRO_MOUSE_ID_HORIZ_WHEELDOWN,
+  RETRO_MOUSE_ID_COUNT,
 } RetroMouseId;
 
 #define RETRO_TYPE_LIGHTGUN_ID (retro_lightgun_id_get_type ())
@@ -107,6 +109,7 @@ GType retro_lightgun_id_get_type (void) G_GNUC_CONST;
  * @RETRO_LIGHTGUN_ID_TURBO: the turbo button of a lightgun
  * @RETRO_LIGHTGUN_ID_PAUSE: the pause button of a lightgun
  * @RETRO_LIGHTGUN_ID_START: the start button of a lightgun
+ * @RETRO_LIGHTGUN_ID_COUNT: the number of ids
  *
  * Represents the inputs for the Libretro lightgun.
  */
@@ -119,6 +122,7 @@ typedef enum
   RETRO_LIGHTGUN_ID_TURBO,
   RETRO_LIGHTGUN_ID_PAUSE,
   RETRO_LIGHTGUN_ID_START,
+  RETRO_LIGHTGUN_ID_COUNT,
 } RetroLightgunId;
 
 #define RETRO_TYPE_ANALOG_ID (retro_analog_id_get_type ())
@@ -129,6 +133,7 @@ GType retro_analog_id_get_type (void) G_GNUC_CONST;
  * RetroAnalogId:
  * @RETRO_ANALOG_ID_X: the X axis of an analog stick
  * @RETRO_ANALOG_ID_Y: the Y axis of an analog stick
+ * @RETRO_ANALOG_ID_COUNT: the number of ids
  *
  * Represents the axes of the analog sticks for the Libretro gamepad.
  */
@@ -136,6 +141,7 @@ typedef enum
 {
   RETRO_ANALOG_ID_X,
   RETRO_ANALOG_ID_Y,
+  RETRO_ANALOG_ID_COUNT,
 } RetroAnalogId;
 
 #define RETRO_TYPE_ANALOG_INDEX (retro_analog_index_get_type ())
@@ -146,6 +152,7 @@ GType retro_analog_index_get_type (void) G_GNUC_CONST;
  * RetroAnalogIndex:
  * @RETRO_ANALOG_INDEX_LEFT: the left analog stick
  * @RETRO_ANALOG_INDEX_RIGHT: the right analog stick
+ * @RETRO_ANALOG_INDEX_COUNT: the number of indexes
  *
  * Represents the analog sticks for the Libretro gamepad.
  */
@@ -153,6 +160,7 @@ typedef enum
 {
   RETRO_ANALOG_INDEX_LEFT,
   RETRO_ANALOG_INDEX_RIGHT,
+  RETRO_ANALOG_INDEX_COUNT,
 } RetroAnalogIndex;
 
 #define RETRO_TYPE_POINTER_ID (retro_pointer_id_get_type ())
@@ -164,6 +172,7 @@ GType retro_pointer_id_get_type (void) G_GNUC_CONST;
  * @RETRO_POINTER_ID_X: the X axis of a pointer
  * @RETRO_POINTER_ID_Y: the Y axis of a pointer
  * @RETRO_POINTER_ID_PRESSED: the pression of a pointer
+ * @RETRO_POINTER_ID_COUNT: the number of ids
  *
  * Represents the inputs for the Libretro pointer.
  */
@@ -172,6 +181,7 @@ typedef enum
   RETRO_POINTER_ID_X,
   RETRO_POINTER_ID_Y,
   RETRO_POINTER_ID_PRESSED,
+  RETRO_POINTER_ID_COUNT,
 } RetroPointerId;
 
 G_END_DECLS


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