[retro-gtk/count: 3/4] controller-type: Drop the COUNT value
- From: Adrien Plazas <aplazas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [retro-gtk/count: 3/4] controller-type: Drop the COUNT value
- Date: Fri, 11 Sep 2020 08:30:51 +0000 (UTC)
commit dc4fd5c6e32e8a9665cca4df911adc8ce84172a2
Author: Adrien Plazas <kekun plazas laposte net>
Date: Fri Sep 11 10:07:49 2020 +0200
controller-type: Drop the COUNT value
It's not per-se a value and hence shouldn't be presented as such.
retro-gtk/retro-core-view.c | 2 ++
retro-gtk/retro-core.c | 2 ++
shared/retro-controller-state.c | 2 ++
shared/retro-controller-type.h | 2 --
tests/retro-test-controller.c | 1 +
5 files changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/retro-gtk/retro-core-view.c b/retro-gtk/retro-core-view.c
index 47e39894..9f331400 100644
--- a/retro-gtk/retro-core-view.c
+++ b/retro-gtk/retro-core-view.c
@@ -15,6 +15,8 @@
#include "retro-input-private.h"
#include "retro-keyboard-private.h"
+#define RETRO_CONTROLLER_TYPE_COUNT (RETRO_CONTROLLER_TYPE_POINTER + 1)
+
struct _RetroCoreView
{
GtkEventBox parent_instance;
diff --git a/retro-gtk/retro-core.c b/retro-gtk/retro-core.c
index fe508b2d..e91a5a7a 100644
--- a/retro-gtk/retro-core.c
+++ b/retro-gtk/retro-core.c
@@ -27,6 +27,8 @@
#include "retro-pixdata-private.h"
#include "retro-runner-process-private.h"
+#define RETRO_CONTROLLER_TYPE_COUNT (RETRO_CONTROLLER_TYPE_POINTER + 1)
+
#define RETRO_CORE_ERROR (retro_core_error_quark ())
enum {
diff --git a/shared/retro-controller-state.c b/shared/retro-controller-state.c
index a036d80d..292e1ae7 100644
--- a/shared/retro-controller-state.c
+++ b/shared/retro-controller-state.c
@@ -9,6 +9,8 @@
#include "retro-controller-type.h"
#include "retro-input-private.h"
+#define RETRO_CONTROLLER_TYPE_COUNT (RETRO_CONTROLLER_TYPE_POINTER + 1)
+
typedef struct {
gboolean is_dirty;
gboolean supports_rumble;
diff --git a/shared/retro-controller-type.h b/shared/retro-controller-type.h
index f327e006..81823c96 100644
--- a/shared/retro-controller-type.h
+++ b/shared/retro-controller-type.h
@@ -23,7 +23,6 @@ GType retro_controller_type_get_type (void) G_GNUC_CONST;
* @RETRO_CONTROLLER_TYPE_LIGHTGUN: a lightgun
* @RETRO_CONTROLLER_TYPE_ANALOG: a gamepad with analog sticks
* @RETRO_CONTROLLER_TYPE_POINTER: a screen pointer
- * @RETRO_CONTROLLER_TYPE_COUNT: the number of types
* @RETRO_CONTROLLER_TYPE_TYPE_MASK: a mask to get the super type of a derived one
*
* Represents the base types for Libretro controllers.
@@ -37,7 +36,6 @@ typedef enum
RETRO_CONTROLLER_TYPE_LIGHTGUN,
RETRO_CONTROLLER_TYPE_ANALOG,
RETRO_CONTROLLER_TYPE_POINTER,
- RETRO_CONTROLLER_TYPE_COUNT,
RETRO_CONTROLLER_TYPE_TYPE_MASK = 0xff,
} RetroControllerType;
diff --git a/tests/retro-test-controller.c b/tests/retro-test-controller.c
index af241720..4c29f7ea 100644
--- a/tests/retro-test-controller.c
+++ b/tests/retro-test-controller.c
@@ -22,6 +22,7 @@
#define RETRO_ANALOG_ID_INDEX_COUNT 4
#define RETRO_ANALOG_ID_INDEX(id, index) ((index << 1) | id)
+#define RETRO_CONTROLLER_TYPE_COUNT (RETRO_CONTROLLER_TYPE_POINTER + 1)
#define RETRO_RUMBLE_EFFECT_COUNT (RETRO_RUMBLE_EFFECT_WEAK + 1)
struct _RetroTestController
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]