[retro-gtk/mkenums: 15/16] pixel-format: Don't give it a GType
- From: Adrien Plazas <aplazas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [retro-gtk/mkenums: 15/16] pixel-format: Don't give it a GType
- Date: Fri, 22 May 2020 09:34:09 +0000 (UTC)
commit 2889b1aa93c7432015d29946ae13f6e0358d0120
Author: Adrien Plazas <kekun plazas laposte net>
Date: Mon Apr 13 16:59:32 2020 +0200
pixel-format: Don't give it a GType
This makes RetroPixelFormat a regular enum without a GType, because we
don't need it.
shared/retro-pixel-format-private.h | 4 ----
shared/retro-pixel-format.c | 23 -----------------------
2 files changed, 27 deletions(-)
---
diff --git a/shared/retro-pixel-format-private.h b/shared/retro-pixel-format-private.h
index 8153b03..d59891e 100644
--- a/shared/retro-pixel-format-private.h
+++ b/shared/retro-pixel-format-private.h
@@ -11,10 +11,6 @@
G_BEGIN_DECLS
-#define RETRO_TYPE_PIXEL_FORMAT (retro_pixel_format_get_type ())
-
-GType retro_pixel_format_get_type (void) G_GNUC_CONST;
-
/**
* RetroPixelFormat:
* @RETRO_PIXEL_FORMAT_XRGB1555: native endian, the first bit is ignored
diff --git a/shared/retro-pixel-format.c b/shared/retro-pixel-format.c
index 685d0e0..d4d87e3 100644
--- a/shared/retro-pixel-format.c
+++ b/shared/retro-pixel-format.c
@@ -2,29 +2,6 @@
#include "retro-pixel-format-private.h"
-GType
-retro_pixel_format_get_type (void)
-{
- static volatile gsize retro_pixel_format_type = 0;
-
- if (g_once_init_enter (&retro_pixel_format_type)) {
- static const GEnumValue values[] = {
- { RETRO_PIXEL_FORMAT_XRGB1555, "RETRO_PIXEL_FORMAT_XRGB1555", "xrgb1555" },
- { RETRO_PIXEL_FORMAT_XRGB8888, "RETRO_PIXEL_FORMAT_XRGB8888", "xrgb8888" },
- { RETRO_PIXEL_FORMAT_RGB565, "RETRO_PIXEL_FORMAT_RGB565", "rgb565" },
- { RETRO_PIXEL_FORMAT_UNKNOWN, "RETRO_PIXEL_FORMAT_UNKNOWN", "unknown" },
- { 0, NULL, NULL },
- };
- GType type;
-
- type = g_enum_register_static ("RetroPixelFormat", values);
-
- g_once_init_leave (&retro_pixel_format_type, type);
- }
-
- return retro_pixel_format_type;
-}
-
gboolean
retro_pixel_format_to_gl (RetroPixelFormat pixel_format,
GLenum *format,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]