[retro-gtk] controller-codes: Implement mouse buttons 4 and 5
- From: Adrien Plazas <aplazas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [retro-gtk] controller-codes: Implement mouse buttons 4 and 5
- Date: Sun, 20 Dec 2020 18:50:52 +0000 (UTC)
commit e2866c71648e124ebfd3bf425d89ef245f697e9e
Author: Adrien Plazas <kekun plazas laposte net>
Date: Sun Dec 20 19:05:18 2020 +0100
controller-codes: Implement mouse buttons 4 and 5
UNIMPLEMENTED.md | 9 ---------
shared/retro-controller-codes-private.h | 2 +-
shared/retro-controller-codes.h | 4 ++++
3 files changed, 5 insertions(+), 10 deletions(-)
---
diff --git a/UNIMPLEMENTED.md b/UNIMPLEMENTED.md
index cf8e55e..66fb967 100644
--- a/UNIMPLEMENTED.md
+++ b/UNIMPLEMENTED.md
@@ -835,15 +835,6 @@ struct retro_memory_map
};
```
-## Mouse
-
-The following mouse buttons are unimplemented:
-
-```
-#define RETRO_DEVICE_ID_MOUSE_BUTTON_4 9
-#define RETRO_DEVICE_ID_MOUSE_BUTTON_5 10
-```
-
## Overscan
Overscan is implemented by `RetroCore.overscan` but is never set and can't be
diff --git a/shared/retro-controller-codes-private.h b/shared/retro-controller-codes-private.h
index c83cd7b..4445377 100644
--- a/shared/retro-controller-codes-private.h
+++ b/shared/retro-controller-codes-private.h
@@ -14,7 +14,7 @@ G_BEGIN_DECLS
#define RETRO_ANALOG_INDEX_COUNT (RETRO_ANALOG_INDEX_RIGHT + 1)
#define RETRO_JOYPAD_ID_COUNT (RETRO_JOYPAD_ID_R3 + 1)
#define RETRO_LIGHTGUN_ID_COUNT (RETRO_LIGHTGUN_ID_START + 1)
-#define RETRO_MOUSE_ID_COUNT (RETRO_MOUSE_ID_HORIZ_WHEELDOWN + 1)
+#define RETRO_MOUSE_ID_COUNT (RETRO_MOUSE_ID_BUTTON_5 + 1)
#define RETRO_POINTER_ID_COUNT (RETRO_POINTER_ID_PRESSED + 1)
G_END_DECLS
diff --git a/shared/retro-controller-codes.h b/shared/retro-controller-codes.h
index f6f6324..9c4d9fd 100644
--- a/shared/retro-controller-codes.h
+++ b/shared/retro-controller-codes.h
@@ -78,6 +78,8 @@ 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_BUTTON_4: the fourth button of a mouse
+ * @RETRO_MOUSE_ID_BUTTON_5: the fifth button of a mouse
*
* Represents the inputs for the Libretro mouse.
*/
@@ -92,6 +94,8 @@ typedef enum
RETRO_MOUSE_ID_MIDDLE,
RETRO_MOUSE_ID_HORIZ_WHEELUP,
RETRO_MOUSE_ID_HORIZ_WHEELDOWN,
+ RETRO_MOUSE_ID_BUTTON_4,
+ RETRO_MOUSE_ID_BUTTON_5,
} RetroMouseId;
#define RETRO_TYPE_LIGHTGUN_ID (retro_lightgun_id_get_type ())
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]