[retro-gtk] core: Move retro_core_set_system_av_info() to retro-core.c



commit eed65960a5df69a2819484a5ea9245705ff2933e
Author: Exalm <exalm7659 gmail com>
Date:   Thu Apr 26 17:03:54 2018 +0500

    core: Move retro_core_set_system_av_info() to retro-core.c

 retro-gtk/retro-core.c        | 16 ++++++++++++++++
 retro-gtk/retro-environment.c | 20 --------------------
 2 files changed, 16 insertions(+), 20 deletions(-)
---
diff --git a/retro-gtk/retro-core.c b/retro-gtk/retro-core.c
index 75f502b..598aee1 100644
--- a/retro-gtk/retro-core.c
+++ b/retro-gtk/retro-core.c
@@ -595,6 +595,22 @@ retro_core_get_needs_full_path (RetroCore *self)
   return system_info.need_fullpath;
 }
 
+void
+retro_core_set_system_av_info (RetroCore         *self,
+                               RetroSystemAvInfo *system_av_info)
+{
+  if (self->frames_per_second != system_av_info->timing.fps) {
+    self->frames_per_second = system_av_info->timing.fps;
+    g_object_notify (G_OBJECT (self), "frames-per-second");
+  }
+  if (system_av_info->geometry.aspect_ratio > 0.f)
+    self->aspect_ratio = system_av_info->geometry.aspect_ratio;
+  else
+    self->aspect_ratio = (float) system_av_info->geometry.base_width /
+                             (float) system_av_info->geometry.base_height;
+  self->sample_rate = system_av_info->timing.sample_rate;
+}
+
 /**
  * retro_core_get_name:
  * @self: a #RetroCore
diff --git a/retro-gtk/retro-environment.c b/retro-gtk/retro-environment.c
index 3000fea..0a94048 100644
--- a/retro-gtk/retro-environment.c
+++ b/retro-gtk/retro-environment.c
@@ -7,9 +7,6 @@
 #include "retro-input-private.h"
 #include "retro-pixdata-private.h"
 
-void retro_core_set_system_av_info (RetroCore         *self,
-                                    RetroSystemAvInfo *system_av_info);
-
 enum RetroLogLevel {
   RETRO_LOG_LEVEL_DEBUG = 0,
   RETRO_LOG_LEVEL_INFO,
@@ -566,20 +563,3 @@ retro_core_set_callbacks (RetroCore *self)
   set_input_state (on_input_state);
   retro_core_pop_cb_data ();
 }
-
-// TODO This is internal, make it private as soon as possible.
-void
-retro_core_set_system_av_info (RetroCore         *self,
-                               RetroSystemAvInfo *system_av_info)
-{
-  if (self->frames_per_second != system_av_info->timing.fps) {
-    self->frames_per_second = system_av_info->timing.fps;
-    g_object_notify (G_OBJECT (self), "frames-per-second");
-  }
-  if (system_av_info->geometry.aspect_ratio > 0.f)
-    self->aspect_ratio = system_av_info->geometry.aspect_ratio;
-  else
-    self->aspect_ratio = (float) system_av_info->geometry.base_width /
-                             (float) system_av_info->geometry.base_height;
-  self->sample_rate = system_av_info->timing.sample_rate;
-}


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