[retro-gtk/wip/aplazas/test: 2/3] Port SystemAvInfo to C



commit 33a3717b4572b2ca7836e53ef6dd1fee32dc69db
Author: Adrien Plazas <kekun plazas laposte net>
Date:   Fri Sep 1 10:07:24 2017 +0200

    Port SystemAvInfo to C

 retro-gtk/Makefile.am            |    1 -
 retro-gtk/av-info.vala           |   33 ---------------------------------
 retro-gtk/core.vala              |    2 --
 retro-gtk/retro-module.h         |    1 +
 retro-gtk/retro-system-av-info.h |   37 +++++++++++++++++++++++++++++++++++++
 5 files changed, 38 insertions(+), 36 deletions(-)
---
diff --git a/retro-gtk/Makefile.am b/retro-gtk/Makefile.am
index 41546ac..71631bc 100644
--- a/retro-gtk/Makefile.am
+++ b/retro-gtk/Makefile.am
@@ -41,7 +41,6 @@ libretro_gtk_la_SOURCES = \
        variable/options.vala \
        variable/variables.vala \
        \
-       av-info.vala \
        core.vala \
        core-error.vala \
        memory.vala \
diff --git a/retro-gtk/core.vala b/retro-gtk/core.vala
index ab07277..e898f2f 100644
--- a/retro-gtk/core.vala
+++ b/retro-gtk/core.vala
@@ -230,8 +230,6 @@ public class Core : Object {
        private extern void on_input_controller_connected (uint port, InputDevice device);
        private extern void on_input_controller_disconnected (uint port);
        private extern bool on_key_event (Gdk.EventKey event);
-
-       private extern void set_system_av_info (SystemAvInfo system_av_info);
 }
 
 }
diff --git a/retro-gtk/retro-module.h b/retro-gtk/retro-module.h
index fa53433..1041126 100644
--- a/retro-gtk/retro-module.h
+++ b/retro-gtk/retro-module.h
@@ -6,6 +6,7 @@
 #include <glib-object.h>
 #include "retro-gtk-internal.h"
 #include "retro-game-info.h"
+#include "retro-system-av-info.h"
 #include "retro-system-info.h"
 
 G_BEGIN_DECLS
diff --git a/retro-gtk/retro-system-av-info.h b/retro-gtk/retro-system-av-info.h
new file mode 100644
index 0000000..9419cdd
--- /dev/null
+++ b/retro-gtk/retro-system-av-info.h
@@ -0,0 +1,37 @@
+// This file is part of retro-gtk. License: GPL-3.0+.
+
+#ifndef RETRO_SYSTEM_AV_INFO_H
+#define RETRO_SYSTEM_AV_INFO_H
+
+#include <glib.h>
+
+G_BEGIN_DECLS
+
+typedef struct _RetroGameGeometry RetroGameGeometry;
+typedef struct _RetroSystemTiming RetroSystemTiming;
+typedef struct _RetroSystemAvInfo RetroSystemAvInfo;
+
+struct _RetroGameGeometry
+{
+   guint base_width;
+   guint base_height;
+   guint max_width;
+   guint max_height;
+   gfloat aspect_ratio;
+};
+
+struct _RetroSystemTiming
+{
+  gdouble fps;
+  gdouble sample_rate;
+};
+
+struct _RetroSystemAvInfo
+{
+  RetroGameGeometry geometry;
+  RetroSystemTiming timing;
+};
+
+G_END_DECLS
+
+#endif /* RETRO_SYSTEM_AV_INFO_H */


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