[retro-gtk] Stop namespacing static functions unless they are overrides



commit 1d60d01d94d0948296858cdb5124d698dd45cbf1
Author: Alexander Mikhaylenko <alexm gnome org>
Date:   Sat Feb 22 20:34:15 2020 +0500

    Stop namespacing static functions unless they are overrides

 retro-gtk/retro-cairo-display.c   |  30 +++++-----
 retro-gtk/retro-core-descriptor.c | 115 +++++++++++++++++++-------------------
 retro-gtk/retro-core-view.c       | 115 +++++++++++++++++++-------------------
 retro-gtk/retro-core.c            |  12 ++--
 retro-gtk/retro-gl-display.c      |  62 ++++++++++----------
 retro-gtk/retro-module-iterator.c |  43 +++++++-------
 retro-gtk/retro-module-query.c    |   4 +-
 retro-runner/retro-core.c         | 104 +++++++++++++++++-----------------
 retro-runner/retro-pa-player.c    |  18 +++---
 tests/retro-reftest-file.c        |  31 +++++-----
 tests/retro-reftest.c             |   6 +-
 11 files changed, 271 insertions(+), 269 deletions(-)
---
diff --git a/retro-gtk/retro-cairo-display.c b/retro-gtk/retro-cairo-display.c
index e71502a..c4a9d68 100644
--- a/retro-gtk/retro-cairo-display.c
+++ b/retro-gtk/retro-cairo-display.c
@@ -27,11 +27,11 @@ static GParamSpec *properties [N_PROPS];
 /* Private */
 
 static void
-retro_cairo_display_get_video_box (RetroCairoDisplay *self,
-                                   gdouble           *width,
-                                   gdouble           *height,
-                                   gdouble           *x,
-                                   gdouble           *y)
+get_video_box (RetroCairoDisplay *self,
+               gdouble           *width,
+               gdouble           *height,
+               gdouble           *x,
+               gdouble           *y)
 {
   gdouble w;
   gdouble h;
@@ -66,8 +66,8 @@ retro_cairo_display_get_video_box (RetroCairoDisplay *self,
 }
 
 static void
-retro_cairo_display_draw_background (RetroCairoDisplay *self,
-                                     cairo_t           *cr)
+draw_background (RetroCairoDisplay *self,
+                 cairo_t           *cr)
 {
   g_assert (cr != NULL);
 
@@ -94,7 +94,7 @@ retro_cairo_display_draw (GtkWidget *widget,
   gdouble ys;
   cairo_pattern_t *source;
 
-  retro_cairo_display_draw_background (self, cr);
+  draw_background (self, cr);
 
   if (self->pixbuf == NULL)
     return FALSE;
@@ -110,7 +110,7 @@ retro_cairo_display_draw (GtkWidget *widget,
   }
 
   surface = gdk_cairo_surface_create_from_pixbuf (to_draw, 1, NULL);
-  retro_cairo_display_get_video_box (self, &w, &h, &x, &y);
+  get_video_box (self, &w, &h, &x, &y);
   xs = w / gdk_pixbuf_get_width (to_draw);
   ys = h / gdk_pixbuf_get_height (to_draw);
 
@@ -239,9 +239,9 @@ retro_cairo_display_init (RetroCairoDisplay *self)
 }
 
 static void
-retro_cairo_display_on_video_output (RetroCore    *sender,
-                                     RetroPixdata *pixdata,
-                                     gpointer      user_data)
+on_video_output (RetroCore    *sender,
+                 RetroPixdata *pixdata,
+                 gpointer      user_data)
 {
   RetroCairoDisplay *self = RETRO_CAIRO_DISPLAY (user_data);
 
@@ -280,7 +280,9 @@ retro_cairo_display_set_core (RetroCairoDisplay *self,
 
   if (core != NULL) {
     self->core = g_object_ref (core);
-    self->on_video_output_id = g_signal_connect_object (core, "video-output", (GCallback) 
retro_cairo_display_on_video_output, self, 0);
+    self->on_video_output_id =
+      g_signal_connect_object (core, "video-output",
+                               (GCallback) on_video_output, self, 0);
   }
 }
 
@@ -379,7 +381,7 @@ retro_cairo_display_get_coordinates_on_display (RetroCairoDisplay *self,
   g_return_val_if_fail (display_x != NULL, FALSE);
   g_return_val_if_fail (display_y != NULL, FALSE);
 
-  retro_cairo_display_get_video_box (self, &w, &h, &x, &y);
+  get_video_box (self, &w, &h, &x, &y);
 
   // Return coordinates as a [-1.0, 1.0] scale, (0.0, 0.0) is the center.
   *display_x = ((widget_x - x) * 2.0 - w) / w;
diff --git a/retro-gtk/retro-core-descriptor.c b/retro-gtk/retro-core-descriptor.c
index cdea0ec..5e3dae2 100644
--- a/retro-gtk/retro-core-descriptor.c
+++ b/retro-gtk/retro-core-descriptor.c
@@ -187,10 +187,10 @@ get_string_list_prefixed (RetroCoreDescriptor  *self,
 }
 
 static void
-retro_core_descriptor_check_has_required_key (RetroCoreDescriptor  *self,
-                                              const gchar          *group,
-                                              const gchar          *key,
-                                              GError              **error)
+check_has_required_key (RetroCoreDescriptor  *self,
+                        const gchar          *group,
+                        const gchar          *key,
+                        GError              **error)
 {
   gboolean has_key;
   GError *tmp_error = NULL;
@@ -220,45 +220,45 @@ retro_core_descriptor_check_has_required_key (RetroCoreDescriptor  *self,
 }
 
 static void
-retro_core_descriptor_check_libretro_group (RetroCoreDescriptor  *self,
-                                            GError              **error)
+check_libretro_group (RetroCoreDescriptor  *self,
+                      GError              **error)
 {
   GError *tmp_error = NULL;
 
-  retro_core_descriptor_check_has_required_key (self,
-                                                RETRO_CORE_DESCRIPTOR_LIBRETRO_GROUP,
-                                                RETRO_CORE_DESCRIPTOR_TYPE_KEY,
-                                                &tmp_error);
+  check_has_required_key (self,
+                          RETRO_CORE_DESCRIPTOR_LIBRETRO_GROUP,
+                          RETRO_CORE_DESCRIPTOR_TYPE_KEY,
+                          &tmp_error);
   if (G_UNLIKELY (tmp_error != NULL)) {
     g_propagate_error (error, tmp_error);
 
     return;
   }
 
-  retro_core_descriptor_check_has_required_key (self,
-                                                RETRO_CORE_DESCRIPTOR_LIBRETRO_GROUP,
-                                                RETRO_CORE_DESCRIPTOR_NAME_KEY,
-                                                &tmp_error);
+  check_has_required_key (self,
+                          RETRO_CORE_DESCRIPTOR_LIBRETRO_GROUP,
+                          RETRO_CORE_DESCRIPTOR_NAME_KEY,
+                          &tmp_error);
   if (G_UNLIKELY (tmp_error != NULL)) {
     g_propagate_error (error, tmp_error);
 
     return;
   }
 
-  retro_core_descriptor_check_has_required_key (self,
-                                                RETRO_CORE_DESCRIPTOR_LIBRETRO_GROUP,
-                                                RETRO_CORE_DESCRIPTOR_MODULE_KEY,
-                                                &tmp_error);
+  check_has_required_key (self,
+                          RETRO_CORE_DESCRIPTOR_LIBRETRO_GROUP,
+                          RETRO_CORE_DESCRIPTOR_MODULE_KEY,
+                          &tmp_error);
   if (G_UNLIKELY (tmp_error != NULL)) {
     g_propagate_error (error, tmp_error);
 
     return;
   }
 
-  retro_core_descriptor_check_has_required_key (self,
-                                                RETRO_CORE_DESCRIPTOR_LIBRETRO_GROUP,
-                                                RETRO_CORE_DESCRIPTOR_LIBRETRO_VERSION_KEY,
-                                                &tmp_error);
+  check_has_required_key (self,
+                          RETRO_CORE_DESCRIPTOR_LIBRETRO_GROUP,
+                          RETRO_CORE_DESCRIPTOR_LIBRETRO_VERSION_KEY,
+                          &tmp_error);
   if (G_UNLIKELY (tmp_error != NULL)) {
     g_propagate_error (error, tmp_error);
 
@@ -267,9 +267,9 @@ retro_core_descriptor_check_libretro_group (RetroCoreDescriptor  *self,
 }
 
 static void
-retro_core_descriptor_check_platform_group (RetroCoreDescriptor  *self,
-                                            const gchar          *group,
-                                            GError              **error)
+check_platform_group (RetroCoreDescriptor  *self,
+                      const gchar          *group,
+                      GError              **error)
 {
   gboolean has_key;
   gchar **firmwares;
@@ -279,10 +279,10 @@ retro_core_descriptor_check_platform_group (RetroCoreDescriptor  *self,
 
   g_assert (group != NULL);
 
-  retro_core_descriptor_check_has_required_key (self,
-                                                group,
-                                                RETRO_CORE_DESCRIPTOR_PLATFORM_MIME_TYPE_KEY,
-                                                &tmp_error);
+  check_has_required_key (self,
+                          group,
+                          RETRO_CORE_DESCRIPTOR_PLATFORM_MIME_TYPE_KEY,
+                          &tmp_error);
 
   has_key = g_key_file_has_key (self->key_file,
                                 group,
@@ -333,28 +333,28 @@ retro_core_descriptor_check_platform_group (RetroCoreDescriptor  *self,
 }
 
 static void
-retro_core_descriptor_check_firmware_group (RetroCoreDescriptor  *self,
-                                            const gchar          *group,
-                                            GError              **error)
+check_firmware_group (RetroCoreDescriptor  *self,
+                      const gchar          *group,
+                      GError              **error)
 {
   GError *tmp_error = NULL;
 
   g_assert (group != NULL);
 
-  retro_core_descriptor_check_has_required_key (self,
-                                                group,
-                                                RETRO_CORE_DESCRIPTOR_FIRMWARE_PATH_KEY,
-                                                &tmp_error);
+  check_has_required_key (self,
+                          group,
+                          RETRO_CORE_DESCRIPTOR_FIRMWARE_PATH_KEY,
+                          &tmp_error);
   if (G_UNLIKELY (tmp_error != NULL)) {
     g_propagate_error (error, tmp_error);
 
     return;
   }
 
-  retro_core_descriptor_check_has_required_key (self,
-                                                group,
-                                                RETRO_CORE_DESCRIPTOR_FIRMWARE_MANDATORY_KEY,
-                                                &tmp_error);
+  check_has_required_key (self,
+                          group,
+                          RETRO_CORE_DESCRIPTOR_FIRMWARE_MANDATORY_KEY,
+                          &tmp_error);
   if (G_UNLIKELY (tmp_error != NULL)) {
     g_propagate_error (error, tmp_error);
 
@@ -382,7 +382,10 @@ retro_core_descriptor_has_icon (RetroCoreDescriptor  *self,
 
   g_return_val_if_fail (RETRO_IS_CORE_DESCRIPTOR (self), FALSE);
 
-  has_icon = g_key_file_has_key (self->key_file, RETRO_CORE_DESCRIPTOR_LIBRETRO_GROUP, 
RETRO_CORE_DESCRIPTOR_ICON_KEY, &tmp_error);
+  has_icon = g_key_file_has_key (self->key_file,
+                                 RETRO_CORE_DESCRIPTOR_LIBRETRO_GROUP,
+                                 RETRO_CORE_DESCRIPTOR_ICON_KEY,
+                                 &tmp_error);
   if (G_UNLIKELY (tmp_error != NULL)) {
     g_propagate_error (error, tmp_error);
 
@@ -782,10 +785,10 @@ retro_core_descriptor_get_firmware_path (RetroCoreDescriptor  *self,
                                          GError              **error)
 {
   return get_string_prefixed (self,
-                                       RETRO_CORE_DESCRIPTOR_FIRMWARE_GROUP_PREFIX,
-                                       firmware,
-                                       RETRO_CORE_DESCRIPTOR_FIRMWARE_PATH_KEY,
-                                       error);
+                              RETRO_CORE_DESCRIPTOR_FIRMWARE_GROUP_PREFIX,
+                              firmware,
+                              RETRO_CORE_DESCRIPTOR_FIRMWARE_PATH_KEY,
+                              error);
 }
 
 /**
@@ -804,10 +807,10 @@ retro_core_descriptor_get_firmware_md5 (RetroCoreDescriptor  *self,
                                         GError              **error)
 {
   return get_string_prefixed (self,
-                                       RETRO_CORE_DESCRIPTOR_FIRMWARE_GROUP_PREFIX,
-                                       firmware,
-                                       RETRO_CORE_DESCRIPTOR_FIRMWARE_MD5_KEY,
-                                       error);
+                              RETRO_CORE_DESCRIPTOR_FIRMWARE_GROUP_PREFIX,
+                              firmware,
+                              RETRO_CORE_DESCRIPTOR_FIRMWARE_MD5_KEY,
+                              error);
 }
 
 /**
@@ -826,10 +829,10 @@ retro_core_descriptor_get_firmware_sha512 (RetroCoreDescriptor  *self,
                                            GError              **error)
 {
   return get_string_prefixed (self,
-                                       RETRO_CORE_DESCRIPTOR_FIRMWARE_GROUP_PREFIX,
-                                       firmware,
-                                       RETRO_CORE_DESCRIPTOR_FIRMWARE_SHA512_KEY,
-                                       error);
+                              RETRO_CORE_DESCRIPTOR_FIRMWARE_GROUP_PREFIX,
+                              firmware,
+                              RETRO_CORE_DESCRIPTOR_FIRMWARE_SHA512_KEY,
+                              error);
 }
 
 /**
@@ -955,7 +958,7 @@ retro_core_descriptor_new (const gchar  *filename,
     return NULL;
   }
 
-  retro_core_descriptor_check_libretro_group (self, &tmp_error);
+  check_libretro_group (self, &tmp_error);
   if (G_UNLIKELY (tmp_error != NULL)) {
     g_object_unref (self);
     g_propagate_error (error, tmp_error);
@@ -967,7 +970,7 @@ retro_core_descriptor_new (const gchar  *filename,
   for (i = 0; i < groups_length; i++) {
     if (g_str_has_prefix (groups[i],
                           RETRO_CORE_DESCRIPTOR_PLATFORM_GROUP_PREFIX)) {
-      retro_core_descriptor_check_platform_group (self, groups[i], &tmp_error);
+      check_platform_group (self, groups[i], &tmp_error);
       if (G_UNLIKELY (tmp_error != NULL)) {
         g_strfreev (groups);
         g_object_unref (self);
@@ -978,7 +981,7 @@ retro_core_descriptor_new (const gchar  *filename,
     }
     else if (g_str_has_prefix (groups[i],
                                RETRO_CORE_DESCRIPTOR_FIRMWARE_GROUP_PREFIX)) {
-      retro_core_descriptor_check_firmware_group (self, groups[i], &tmp_error);
+      check_firmware_group (self, groups[i], &tmp_error);
       if (G_UNLIKELY (tmp_error != NULL)) {
         g_strfreev (groups);
         g_object_unref (self);
diff --git a/retro-gtk/retro-core-view.c b/retro-gtk/retro-core-view.c
index 8f42eac..13106e6 100644
--- a/retro-gtk/retro-core-view.c
+++ b/retro-gtk/retro-core-view.c
@@ -108,16 +108,16 @@ recenter_pointer (RetroCoreView *self)
 }
 
 static gboolean
-retro_core_view_get_is_pointer_grabbed (RetroCoreView *self)
+get_is_pointer_grabbed (RetroCoreView *self)
 {
   return self->grabbed_device != NULL;
 }
 
 static void
-retro_core_view_grab (RetroCoreView *self,
-                      GdkDevice     *device,
-                      GdkWindow     *window,
-                      GdkEvent      *event)
+grab (RetroCoreView *self,
+      GdkDevice     *device,
+      GdkWindow     *window,
+      GdkEvent      *event)
 {
   GdkSeat *seat;
   GdkDisplay *display;
@@ -159,7 +159,7 @@ retro_core_view_grab (RetroCoreView *self,
 }
 
 static void
-retro_core_view_ungrab (RetroCoreView *self)
+ungrab (RetroCoreView *self)
 {
   GdkSeat *seat;
 
@@ -176,23 +176,23 @@ retro_core_view_ungrab (RetroCoreView *self)
   g_signal_emit (self, signals[SIG_CONTROLLER_STATE_CHANGED_SIGNAL], 0);
 }
 
-static gboolean retro_core_view_get_key_state (RetroCoreView *self,
-                                               guint16        hardware_keycode);
+static gboolean get_key_state (RetroCoreView *self,
+                               guint16        hardware_keycode);
 
 static gboolean
-retro_core_view_on_key_press_event (GtkWidget   *source,
-                                    GdkEventKey *event,
-                                    gpointer     data)
+on_key_press_event (GtkWidget   *source,
+                    GdkEventKey *event,
+                    gpointer     data)
 {
   RetroCoreView *self = RETRO_CORE_VIEW (data);
   gboolean changed;
 
   if (event->keyval == GDK_KEY_Escape &&
       (event->state & GDK_CONTROL_MASK) &&
-      retro_core_view_get_is_pointer_grabbed (self))
-    retro_core_view_ungrab (self);
+      get_is_pointer_grabbed (self))
+    ungrab (self);
 
-  changed = !retro_core_view_get_key_state (self, event->hardware_keycode);
+  changed = !get_key_state (self, event->hardware_keycode);
 
   set_input_pressed (self->key_state, event->hardware_keycode);
   set_input_pressed (self->keyval_state, event->keyval);
@@ -204,9 +204,9 @@ retro_core_view_on_key_press_event (GtkWidget   *source,
 }
 
 static gboolean
-retro_core_view_on_key_release_event (GtkWidget   *source,
-                                      GdkEventKey *event,
-                                      gpointer     data)
+on_key_release_event (GtkWidget   *source,
+                      GdkEventKey *event,
+                      gpointer     data)
 {
   RetroCoreView *self = RETRO_CORE_VIEW (data);
 
@@ -219,22 +219,19 @@ retro_core_view_on_key_release_event (GtkWidget   *source,
 }
 
 static gboolean
-retro_core_view_on_button_press_event (GtkWidget      *source,
-                                       GdkEventButton *event,
-                                       gpointer        data)
+on_button_press_event (GtkWidget      *source,
+                       GdkEventButton *event,
+                       gpointer        data)
 {
   RetroCoreView *self = RETRO_CORE_VIEW (data);
 
   gtk_widget_grab_focus (GTK_WIDGET (source));
 
   if (retro_core_view_get_can_grab_pointer (self)) {
-    if (retro_core_view_get_is_pointer_grabbed (self))
+    if (get_is_pointer_grabbed (self))
       set_input_pressed (self->mouse_button_state, event->button);
     else
-      retro_core_view_grab (self,
-                            event->device,
-                            event->window,
-                            (GdkEvent *) event);
+      grab (self, event->device, event->window, (GdkEvent *) event);
   }
   else {
     set_input_pressed (self->mouse_button_state, event->button);
@@ -252,9 +249,9 @@ retro_core_view_on_button_press_event (GtkWidget      *source,
 }
 
 static gboolean
-retro_core_view_on_button_release_event (GtkWidget      *source,
-                                         GdkEventButton *event,
-                                         gpointer        data)
+on_button_release_event (GtkWidget      *source,
+                         GdkEventButton *event,
+                         gpointer        data)
 {
   RetroCoreView *self = RETRO_CORE_VIEW (data);
 
@@ -266,14 +263,14 @@ retro_core_view_on_button_release_event (GtkWidget      *source,
 }
 
 static gboolean
-retro_core_view_on_focus_out_event (GtkWidget     *source,
-                                    GdkEventFocus *event,
-                                    gpointer       data)
+on_focus_out_event (GtkWidget     *source,
+                    GdkEventFocus *event,
+                    gpointer       data)
 {
   RetroCoreView *self = RETRO_CORE_VIEW (data);
 
-  if (retro_core_view_get_is_pointer_grabbed (self))
-    retro_core_view_ungrab (self);
+  if (get_is_pointer_grabbed (self))
+    ungrab (self);
 
   reset_input (self->key_state);
   reset_input (self->mouse_button_state);
@@ -284,14 +281,14 @@ retro_core_view_on_focus_out_event (GtkWidget     *source,
 }
 
 static gboolean
-retro_core_view_on_motion_notify_event (GtkWidget      *source,
-                                        GdkEventMotion *event,
-                                        gpointer        data)
+on_motion_notify_event (GtkWidget      *source,
+                        GdkEventMotion *event,
+                        gpointer        data)
 {
   RetroCoreView *self = RETRO_CORE_VIEW (data);
 
   if (retro_core_view_get_can_grab_pointer (self)) {
-    if (retro_core_view_get_is_pointer_grabbed (self) &&
+    if (get_is_pointer_grabbed (self) &&
         event->device == self->grabbed_device) {
       self->mouse_x_delta += event->x_root - (double) self->screen_center_x;
       self->mouse_y_delta += event->y_root - (double) self->screen_center_y;
@@ -315,15 +312,15 @@ retro_core_view_on_motion_notify_event (GtkWidget      *source,
 }
 
 static gboolean
-retro_core_view_get_key_state (RetroCoreView *self,
-                               guint16        hardware_keycode)
+get_key_state (RetroCoreView *self,
+               guint16        hardware_keycode)
 {
   return get_input_state (self->key_state, hardware_keycode);
 }
 
 static gboolean
-retro_core_view_get_joypad_button_state (RetroCoreView *self,
-                                         RetroJoypadId  button)
+get_joypad_button_state (RetroCoreView *self,
+                         RetroJoypadId  button)
 {
   guint16 hardware_keycode;
 
@@ -332,19 +329,19 @@ retro_core_view_get_joypad_button_state (RetroCoreView *self,
 
   hardware_keycode = retro_key_joypad_mapping_get_button_key (self->key_joypad_mapping, button);
 
-  return retro_core_view_get_key_state (self, hardware_keycode);
+  return get_key_state (self, hardware_keycode);
 }
 
 static gboolean
-retro_core_view_get_mouse_button_state (RetroCoreView *self,
-                                        guint16        button)
+get_mouse_button_state (RetroCoreView *self,
+                        guint16        button)
 {
   return get_input_state (self->mouse_button_state, button);
 }
 
 static gboolean
-retro_core_view_get_keyboard_key_state (RetroCoreView *self,
-                                        guint16        key)
+get_keyboard_key_state (RetroCoreView *self,
+                        guint16        key)
 {
   guint16 keyval;
 
@@ -500,12 +497,12 @@ retro_core_view_init (RetroCoreView *self)
   self->key_joypad_mapping = retro_key_joypad_mapping_new_default ();
   self->mouse_button_state = g_hash_table_new_full (g_int_hash, g_int_equal, g_free, g_free);
 
-  g_signal_connect_object (self, "key-press-event", (GCallback) retro_core_view_on_key_press_event, self, 0);
-  g_signal_connect_object (self, "key-release-event", (GCallback) retro_core_view_on_key_release_event, 
self, 0);
-  g_signal_connect_object (self, "button-press-event", (GCallback) retro_core_view_on_button_press_event, 
self, 0);
-  g_signal_connect_object (self, "button-release-event", (GCallback) 
retro_core_view_on_button_release_event, self, 0);
-  g_signal_connect_object (self, "focus-out-event", (GCallback) retro_core_view_on_focus_out_event, self, 0);
-  g_signal_connect_object (self, "motion-notify-event", (GCallback) retro_core_view_on_motion_notify_event, 
self, 0);
+  g_signal_connect_object (self, "key-press-event", (GCallback) on_key_press_event, self, 0);
+  g_signal_connect_object (self, "key-release-event", (GCallback) on_key_release_event, self, 0);
+  g_signal_connect_object (self, "button-press-event", (GCallback) on_button_press_event, self, 0);
+  g_signal_connect_object (self, "button-release-event", (GCallback) on_button_release_event, self, 0);
+  g_signal_connect_object (self, "focus-out-event", (GCallback) on_focus_out_event, self, 0);
+  g_signal_connect_object (self, "motion-notify-event", (GCallback) on_motion_notify_event, self, 0);
 }
 
 /* Public */
@@ -703,7 +700,7 @@ retro_core_view_get_input_state (RetroCoreView *self,
     if (!retro_input_get_joypad (input, &id))
       return 0;
 
-    return retro_core_view_get_joypad_button_state (self, id) ? G_MAXINT16 : 0;
+    return get_joypad_button_state (self, id) ? G_MAXINT16 : 0;
   case RETRO_CONTROLLER_TYPE_MOUSE:
     if (!retro_input_get_mouse (input, &id))
       return 0;
@@ -720,9 +717,9 @@ retro_core_view_get_input_state (RetroCoreView *self,
 
       return result;
     case RETRO_MOUSE_ID_LEFT:
-      return retro_core_view_get_mouse_button_state (self, 1) ? G_MAXINT16 : 0;
+      return get_mouse_button_state (self, 1) ? G_MAXINT16 : 0;
     case RETRO_MOUSE_ID_RIGHT:
-      return retro_core_view_get_mouse_button_state (self, 3) ? G_MAXINT16 : 0;
+      return get_mouse_button_state (self, 3) ? G_MAXINT16 : 0;
     default:
       return 0;
     }
@@ -730,7 +727,7 @@ retro_core_view_get_input_state (RetroCoreView *self,
     if (!retro_input_get_keyboard (input, &id))
       return 0;
 
-    return retro_core_view_get_keyboard_key_state (self, id) ? G_MAXINT16 : 0;
+    return get_keyboard_key_state (self, id) ? G_MAXINT16 : 0;
   case RETRO_CONTROLLER_TYPE_POINTER:
     if (!retro_input_get_pointer (input, &id))
       return 0;
@@ -745,7 +742,7 @@ retro_core_view_get_input_state (RetroCoreView *self,
           retro_core_view_get_snap_pointer_to_borders (self))
         return 0;
 
-      return retro_core_view_get_mouse_button_state (self, 1) ? 1 : 0;
+      return get_mouse_button_state (self, 1) ? 1 : 0;
     default:
       return 0;
     }
@@ -818,8 +815,8 @@ retro_core_view_set_can_grab_pointer (RetroCoreView *self,
   self->can_grab_pointer = can_grab_pointer;
 
   if (can_grab_pointer == FALSE &&
-      retro_core_view_get_is_pointer_grabbed (self))
-    retro_core_view_ungrab (self);
+      get_is_pointer_grabbed (self))
+    ungrab (self);
 
   g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_CAN_GRAB_POINTER]);
 }
diff --git a/retro-gtk/retro-core.c b/retro-gtk/retro-core.c
index 22fd990..761d7a9 100644
--- a/retro-gtk/retro-core.c
+++ b/retro-gtk/retro-core.c
@@ -1034,10 +1034,10 @@ serialize_option_overrides (RetroCore *self)
 
 // FIXME Merge this into retro_core_set_controller().
 static void
-retro_core_set_controller_port_device (RetroCore               *self,
-                                       guint                    port,
-                                       RetroControllerType      controller_type,
-                                       RetroCoreControllerInfo *info)
+set_controller_port_device (RetroCore               *self,
+                            guint                    port,
+                            RetroControllerType      controller_type,
+                            RetroCoreControllerInfo *info)
 {
   g_autoptr(GError) error = NULL;
   g_autoptr(GUnixFDList) fd_list = NULL;
@@ -1198,7 +1198,7 @@ retro_core_boot (RetroCore  *self,
   g_hash_table_iter_init (&iter, self->controllers);
   while (g_hash_table_iter_next (&iter, NULL, (gpointer *) &info)) {
     controller_type = retro_controller_get_controller_type (info->controller);
-    retro_core_set_controller_port_device (self, info->port, controller_type, info);
+    set_controller_port_device (self, info->port, controller_type, info);
   }
 
   if (!ipc_runner_call_get_properties_sync (proxy,
@@ -1679,7 +1679,7 @@ retro_core_set_controller (RetroCore       *self,
   if (!retro_core_get_is_initiated (self))
     return;
 
-  retro_core_set_controller_port_device (self, port, controller_type, info);
+  set_controller_port_device (self, port, controller_type, info);
 }
 
 static void
diff --git a/retro-gtk/retro-gl-display.c b/retro-gtk/retro-gl-display.c
index 551f576..842d5a1 100644
--- a/retro-gtk/retro-gl-display.c
+++ b/retro-gtk/retro-gl-display.c
@@ -53,7 +53,7 @@ static const gchar *filter_uris[] = {
 /* Private */
 
 static void
-retro_gl_display_clear_video (RetroGLDisplay *self)
+clear_video (RetroGLDisplay *self)
 {
   g_clear_object (&self->pixbuf);
   if (self->pixdata != NULL) {
@@ -63,13 +63,13 @@ retro_gl_display_clear_video (RetroGLDisplay *self)
 }
 
 static void
-retro_gl_display_set_pixdata (RetroGLDisplay *self,
-                              RetroPixdata   *pixdata)
+set_pixdata (RetroGLDisplay *self,
+             RetroPixdata   *pixdata)
 {
   if (self->pixdata == pixdata)
     return;
 
-  retro_gl_display_clear_video (self);
+  clear_video (self);
 
   if (pixdata != NULL)
     self->pixdata = retro_pixdata_copy (pixdata);
@@ -78,11 +78,11 @@ retro_gl_display_set_pixdata (RetroGLDisplay *self,
 }
 
 static void
-retro_gl_display_get_video_box (RetroGLDisplay *self,
-                                gdouble        *width,
-                                gdouble        *height,
-                                gdouble        *x,
-                                gdouble        *y)
+get_video_box (RetroGLDisplay *self,
+               gdouble        *width,
+               gdouble        *height,
+               gdouble        *x,
+               gdouble        *y)
 {
   gdouble w;
   gdouble h;
@@ -120,9 +120,9 @@ retro_gl_display_get_video_box (RetroGLDisplay *self,
 }
 
 static gboolean
-retro_gl_display_load_texture (RetroGLDisplay *self,
-                               gint           *texture_width,
-                               gint           *texture_height)
+load_texture (RetroGLDisplay *self,
+              gint           *texture_width,
+              gint           *texture_height)
 {
   glBindTexture (GL_TEXTURE_2D, self->texture);
 
@@ -152,10 +152,10 @@ retro_gl_display_load_texture (RetroGLDisplay *self,
 }
 
 static void
-retro_gl_display_draw_texture (RetroGLDisplay  *self,
-                               RetroGLSLFilter *filter,
-                               gint             texture_width,
-                               gint             texture_height)
+draw_texture (RetroGLDisplay  *self,
+              RetroGLSLFilter *filter,
+              gint             texture_width,
+              gint             texture_height)
 {
   GLfloat source_width, source_height;
   GLfloat target_width, target_height;
@@ -193,7 +193,7 @@ retro_gl_display_draw_texture (RetroGLDisplay  *self,
 }
 
 static void
-retro_gl_display_realize (RetroGLDisplay *self)
+realize (RetroGLDisplay *self)
 {
   GLuint vertex_buffer_object;
   GLuint vertex_array_object;
@@ -260,7 +260,7 @@ retro_gl_display_realize (RetroGLDisplay *self)
 }
 
 static void
-retro_gl_display_unrealize (RetroGLDisplay *self)
+unrealize (RetroGLDisplay *self)
 {
   RetroVideoFilter filter;
 
@@ -273,7 +273,7 @@ retro_gl_display_unrealize (RetroGLDisplay *self)
 }
 
 static gboolean
-retro_gl_display_render (RetroGLDisplay *self)
+render (RetroGLDisplay *self)
 {
   RetroVideoFilter filter;
   gint texture_width;
@@ -287,10 +287,10 @@ retro_gl_display_render (RetroGLDisplay *self)
 
   g_assert (self->glsl_filter[filter] != NULL);
 
-  if (!retro_gl_display_load_texture (self, &texture_width, &texture_height))
+  if (!load_texture (self, &texture_width, &texture_height))
     return FALSE;
 
-  retro_gl_display_draw_texture (self, self->glsl_filter[filter], texture_width, texture_height);
+  draw_texture (self, self->glsl_filter[filter], texture_width, texture_height);
 
   return FALSE;
 }
@@ -337,19 +337,19 @@ retro_gl_display_init (RetroGLDisplay *self)
 {
   g_signal_connect_object (G_OBJECT (self),
                            "realize",
-                           (GCallback) retro_gl_display_realize,
+                           (GCallback) realize,
                            GTK_WIDGET (self),
                            0);
 
   g_signal_connect_object (G_OBJECT (self),
                            "unrealize",
-                           (GCallback) retro_gl_display_unrealize,
+                           (GCallback) unrealize,
                            GTK_WIDGET (self),
                            0);
 
   g_signal_connect_object (G_OBJECT (self),
                            "render",
-                           (GCallback) retro_gl_display_render,
+                           (GCallback) render,
                            GTK_WIDGET (self),
                            0);
 
@@ -363,9 +363,9 @@ retro_gl_display_init (RetroGLDisplay *self)
 }
 
 static void
-retro_gl_display_on_video_output (RetroCore    *sender,
-                                  RetroPixdata *pixdata,
-                                  gpointer      user_data)
+on_video_output (RetroCore    *sender,
+                 RetroPixdata *pixdata,
+                 gpointer      user_data)
 {
   RetroGLDisplay *self = RETRO_GL_DISPLAY (user_data);
 
@@ -373,7 +373,7 @@ retro_gl_display_on_video_output (RetroCore    *sender,
     return;
 
   self->aspect_ratio = retro_pixdata_get_aspect_ratio (pixdata);
-  retro_gl_display_set_pixdata (self, pixdata);
+  set_pixdata (self, pixdata);
 }
 
 /* Public */
@@ -401,7 +401,7 @@ retro_gl_display_set_core (RetroGLDisplay *self,
 
   if (core != NULL) {
     self->core = g_object_ref (core);
-    self->on_video_output_id = g_signal_connect_object (core, "video-output", (GCallback) 
retro_gl_display_on_video_output, self, 0);
+    self->on_video_output_id = g_signal_connect_object (core, "video-output", (GCallback) on_video_output, 
self, 0);
   }
 }
 
@@ -448,7 +448,7 @@ retro_gl_display_set_pixbuf (RetroGLDisplay *self,
   if (self->pixbuf == pixbuf)
     return;
 
-  retro_gl_display_clear_video (self);
+  clear_video (self);
 
   if (pixbuf != NULL)
     self->pixbuf = g_object_ref (pixbuf);
@@ -507,7 +507,7 @@ retro_gl_display_get_coordinates_on_display (RetroGLDisplay *self,
   g_return_val_if_fail (display_x != NULL, FALSE);
   g_return_val_if_fail (display_y != NULL, FALSE);
 
-  retro_gl_display_get_video_box (self, &w, &h, &x, &y);
+  get_video_box (self, &w, &h, &x, &y);
 
   scale_factor = gtk_widget_get_scale_factor (GTK_WIDGET (self));
   widget_x *= scale_factor;
diff --git a/retro-gtk/retro-module-iterator.c b/retro-gtk/retro-module-iterator.c
index 30cb96d..5f63a53 100644
--- a/retro-gtk/retro-module-iterator.c
+++ b/retro-gtk/retro-module-iterator.c
@@ -46,8 +46,8 @@ retro_module_iterator_init (RetroModuleIterator *self)
 }
 
 static RetroModuleIterator *
-retro_module_iterator_new_for_subdirectory (const gchar *lookup_path,
-                                            GHashTable  *visited_paths)
+new_for_subdirectory (const gchar *lookup_path,
+                      GHashTable  *visited_paths)
 {
   RetroModuleIterator *self;
 
@@ -64,7 +64,7 @@ retro_module_iterator_new_for_subdirectory (const gchar *lookup_path,
 }
 
 static gboolean
-retro_module_iterator_was_current_directory_visited (RetroModuleIterator *self)
+was_current_directory_visited (RetroModuleIterator *self)
 {
   GFile *current_directory_file;
   gchar *current_directory_path;
@@ -80,7 +80,7 @@ retro_module_iterator_was_current_directory_visited (RetroModuleIterator *self)
 }
 
 static void
-retro_module_iterator_set_current_directory_as_visited (RetroModuleIterator *self)
+set_current_directory_as_visited (RetroModuleIterator *self)
 {
   GFile *current_directory_file;
   gchar *current_directory_path;
@@ -92,7 +92,7 @@ retro_module_iterator_set_current_directory_as_visited (RetroModuleIterator *sel
 }
 
 static gboolean
-retro_module_iterator_next_in_sub_directory (RetroModuleIterator *self)
+next_in_sub_directory (RetroModuleIterator *self)
 {
   if (retro_module_iterator_next (self->sub_directory)) {
     if (self->core_descriptor != NULL)
@@ -112,10 +112,10 @@ retro_module_iterator_next_in_sub_directory (RetroModuleIterator *self)
 }
 
 static gboolean
-retro_module_iterator_iterate_next_in_current_path (RetroModuleIterator  *self,
-                                                    GFile                *directory,
-                                                    GFileInfo            *info,
-                                                    GError              **error)
+iterate_next_in_current_path (RetroModuleIterator  *self,
+                              GFile                *directory,
+                              GFileInfo            *info,
+                              GError              **error)
 {
   const gchar *sub_directory_basename;
   GFile *sub_directory_file;
@@ -143,10 +143,10 @@ retro_module_iterator_iterate_next_in_current_path (RetroModuleIterator  *self,
       return FALSE;
     }
 
-    self->sub_directory = retro_module_iterator_new_for_subdirectory (sub_directory_path, self->visited);
+    self->sub_directory = new_for_subdirectory (sub_directory_path, self->visited);
     g_free (sub_directory_path);
 
-    return retro_module_iterator_next_in_sub_directory (self);
+    return next_in_sub_directory (self);
   }
 
   core_descriptor_basename = g_file_info_get_name (info);
@@ -174,8 +174,8 @@ retro_module_iterator_iterate_next_in_current_path (RetroModuleIterator  *self,
 }
 
 static gboolean
-retro_module_iterator_next_in_current_path (RetroModuleIterator  *self,
-                                            GError              **error)
+next_in_current_path (RetroModuleIterator  *self,
+                      GError              **error)
 {
   GFile *directory = NULL;
   GFileInfo *info = NULL;
@@ -183,8 +183,7 @@ retro_module_iterator_next_in_current_path (RetroModuleIterator  *self,
 
   GError *tmp_error = NULL;
 
-  if (self->sub_directory != NULL &&
-      retro_module_iterator_next_in_sub_directory (self))
+  if (self->sub_directory != NULL && next_in_sub_directory (self))
     return TRUE;
 
   directory = g_file_new_for_path (self->directories[self->current_directory]);
@@ -227,7 +226,7 @@ retro_module_iterator_next_in_current_path (RetroModuleIterator  *self,
     if (info == NULL)
       break;
 
-    found = retro_module_iterator_iterate_next_in_current_path (self, directory, info, &tmp_error);
+    found = iterate_next_in_current_path (self, directory, info, &tmp_error);
     if (G_UNLIKELY (tmp_error != NULL)) {
       g_propagate_error (error, tmp_error);
       g_object_unref (info);
@@ -282,26 +281,26 @@ retro_module_iterator_get (RetroModuleIterator *self)
 gboolean
 retro_module_iterator_next (RetroModuleIterator *self)
 {
-  gboolean next_in_current_path;
+  gboolean found_next_in_current_path;
   GError *tmp_error = NULL;
 
   g_return_val_if_fail (RETRO_IS_MODULE_ITERATOR (self), FALSE);
 
   while (self->directories[self->current_directory] != NULL) {
-    retro_module_iterator_set_current_directory_as_visited (self);
+    set_current_directory_as_visited (self);
 
-    next_in_current_path = retro_module_iterator_next_in_current_path (self, &tmp_error);
+    found_next_in_current_path = next_in_current_path (self, &tmp_error);
     if (G_UNLIKELY (tmp_error != NULL)) {
       g_debug ("%s", tmp_error->message);
       g_clear_error (&tmp_error);
-      next_in_current_path = FALSE;
+      found_next_in_current_path = FALSE;
     }
 
-    if (next_in_current_path)
+    if (found_next_in_current_path)
       return TRUE;
 
     while (self->directories[self->current_directory] != NULL &&
-           retro_module_iterator_was_current_directory_visited (self))
+           was_current_directory_visited (self))
       self->current_directory++;
   }
 
diff --git a/retro-gtk/retro-module-query.c b/retro-gtk/retro-module-query.c
index 097389c..cca0f01 100644
--- a/retro-gtk/retro-module-query.c
+++ b/retro-gtk/retro-module-query.c
@@ -36,7 +36,7 @@ retro_module_query_init (RetroModuleQuery *self)
 }
 
 static gchar **
-retro_module_query_get_plugin_lookup_paths ()
+get_plugin_lookup_paths ()
 {
   gchar **envp;
   const gchar *env_plugin_path;
@@ -77,7 +77,7 @@ retro_module_query_iterator (RetroModuleQuery *self)
 
   g_return_val_if_fail (RETRO_IS_MODULE_QUERY (self), NULL);
 
-  paths = retro_module_query_get_plugin_lookup_paths ();
+  paths = get_plugin_lookup_paths ();
   result = retro_module_iterator_new ((const gchar * const *) paths,
                                       self->recursive);
   g_strfreev (paths);
diff --git a/retro-runner/retro-core.c b/retro-runner/retro-core.c
index 194caec..1c1c132 100644
--- a/retro-runner/retro-core.c
+++ b/retro-runner/retro-core.c
@@ -60,8 +60,8 @@ static guint signals[N_SIGNALS];
 
 static RetroCore *retro_core_instance = NULL;
 
-static void retro_core_set_filename (RetroCore   *self,
-                                     const gchar *filename);
+static void set_filename (RetroCore   *self,
+                          const gchar *filename);
 
 /* Private */
 
@@ -202,7 +202,7 @@ retro_core_set_property (GObject      *object,
 
   switch (prop_id) {
   case PROP_FILENAME:
-    retro_core_set_filename (self, g_value_get_string (value));
+    set_filename (self, g_value_get_string (value));
 
     break;
   case PROP_SYSTEM_DIRECTORY:
@@ -582,8 +582,8 @@ retro_core_init (RetroCore *self)
 }
 
 static void
-retro_core_set_filename (RetroCore   *self,
-                         const gchar *filename)
+set_filename (RetroCore   *self,
+              const gchar *filename)
 {
   if (g_strcmp0 (filename, retro_core_get_filename (self)) == 0)
     return;
@@ -594,8 +594,8 @@ retro_core_set_filename (RetroCore   *self,
 }
 
 static void
-retro_core_set_is_initiated (RetroCore *self,
-                             gboolean   is_initiated)
+set_is_initiated (RetroCore *self,
+                  gboolean   is_initiated)
 {
   if (retro_core_get_is_initiated (self) == is_initiated)
     return;
@@ -605,8 +605,8 @@ retro_core_set_is_initiated (RetroCore *self,
 }
 
 static void
-retro_core_set_game_loaded (RetroCore *self,
-                            gboolean   game_loaded)
+set_game_loaded (RetroCore *self,
+                 gboolean   game_loaded)
 {
   if (retro_core_get_game_loaded (self) == game_loaded)
     return;
@@ -623,8 +623,8 @@ retro_core_set_game_loaded (RetroCore *self,
  * Gives basic informations on how to handle the Libretro core.
  */
 static void
-retro_core_get_system_info (RetroCore       *self,
-                            RetroSystemInfo *system_info)
+get_system_info (RetroCore       *self,
+                 RetroSystemInfo *system_info)
 {
   RetroGetSystemInfo get_system_info;
 
@@ -635,11 +635,11 @@ retro_core_get_system_info (RetroCore       *self,
 }
 
 static gboolean
-retro_core_get_needs_full_path (RetroCore *self)
+get_needs_full_path (RetroCore *self)
 {
   RetroSystemInfo system_info = { 0 };
 
-  retro_core_get_system_info (self, &system_info);
+  get_system_info (self, &system_info);
 
   return system_info.need_fullpath;
 }
@@ -691,7 +691,7 @@ retro_core_get_name (RetroCore *self)
 {
   RetroSystemInfo system_info = { 0 };
 
-  retro_core_get_system_info (self, &system_info);
+  get_system_info (self, &system_info);
 
   return system_info.library_name;
 }
@@ -710,9 +710,9 @@ retro_core_update_variable (RetroCore   *self,
 }
 
 static gboolean
-retro_core_set_disk_ejected (RetroCore  *self,
-                             gboolean    ejected,
-                             GError    **error)
+set_disk_ejected (RetroCore  *self,
+                  gboolean    ejected,
+                  GError    **error)
 {
   RetroDiskControlCallbackSetEjectState set_eject_state;
 
@@ -731,9 +731,9 @@ retro_core_set_disk_ejected (RetroCore  *self,
 }
 
 static gboolean
-retro_core_set_disk_image_index (RetroCore  *self,
-                                 guint       index,
-                                 GError    **error)
+set_disk_image_index (RetroCore  *self,
+                      guint       index,
+                      GError    **error)
 {
   RetroDiskControlCallbackSetImageIndex set_image_index;
 
@@ -752,8 +752,8 @@ retro_core_set_disk_image_index (RetroCore  *self,
 }
 
 static guint
-retro_core_get_disk_images_number (RetroCore  *self,
-                                   GError    **error)
+get_disk_images_number (RetroCore  *self,
+                        GError    **error)
 {
   RetroDiskControlCallbackGetNumImages get_num_images;
 
@@ -772,10 +772,10 @@ retro_core_get_disk_images_number (RetroCore  *self,
 }
 
 static gboolean
-retro_core_replace_disk_image_index (RetroCore     *self,
-                                     guint          index,
-                                     RetroGameInfo *info,
-                                     GError        **error)
+replace_disk_image_index (RetroCore      *self,
+                          guint           index,
+                          RetroGameInfo  *info,
+                          GError        **error)
 {
   RetroDiskControlCallbackReplaceImageIndex replace_image_index;
 
@@ -794,8 +794,8 @@ retro_core_replace_disk_image_index (RetroCore     *self,
 }
 
 static gboolean
-retro_core_add_disk_image_index (RetroCore  *self,
-                                 GError    **error)
+add_disk_image_index (RetroCore  *self,
+                      GError    **error)
 {
   RetroDiskControlCallbackAddImageIndex add_image_index;
 
@@ -814,8 +814,8 @@ retro_core_add_disk_image_index (RetroCore  *self,
 }
 
 static void
-retro_core_load_discs (RetroCore  *self,
-                       GError    **error)
+load_discs (RetroCore  *self,
+            GError    **error)
 {
   guint length;
   gboolean fullpath;
@@ -825,7 +825,7 @@ retro_core_load_discs (RetroCore  *self,
   RetroGameInfo *game_info = NULL;
   GError *tmp_error = NULL;
 
-  retro_core_set_disk_ejected (self, TRUE, &tmp_error);
+  set_disk_ejected (self, TRUE, &tmp_error);
   if (G_UNLIKELY (tmp_error != NULL)) {
     g_propagate_error (error, tmp_error);
 
@@ -833,9 +833,9 @@ retro_core_load_discs (RetroCore  *self,
   }
 
   length = g_strv_length (self->media_uris);
-  while (retro_core_get_disk_images_number (self, &tmp_error) < length &&
+  while (get_disk_images_number (self, &tmp_error) < length &&
          (tmp_error != NULL)) {
-    retro_core_add_disk_image_index (self, &tmp_error);
+   add_disk_image_index (self, &tmp_error);
     if (G_UNLIKELY (tmp_error != NULL)) {
       g_propagate_error (error, tmp_error);
 
@@ -849,7 +849,7 @@ retro_core_load_discs (RetroCore  *self,
     return;
   }
 
-  fullpath = retro_core_get_needs_full_path (self);
+  fullpath = get_needs_full_path (self);
   for (index = 0; index < length; index++) {
     file = g_file_new_for_uri (self->media_uris[index]);
     path = g_file_get_path (file);
@@ -871,7 +871,7 @@ retro_core_load_discs (RetroCore  *self,
       }
     }
 
-    retro_core_replace_disk_image_index (self, index, game_info, &tmp_error);
+    replace_disk_image_index (self, index, game_info, &tmp_error);
     if (G_UNLIKELY (tmp_error != NULL)) {
       g_propagate_error (error, tmp_error);
 
@@ -887,7 +887,7 @@ retro_core_load_discs (RetroCore  *self,
     g_object_unref (file);
   }
 
-  retro_core_set_disk_ejected (self, FALSE, &tmp_error);
+  set_disk_ejected (self, FALSE, &tmp_error);
   if (G_UNLIKELY (tmp_error != NULL)) {
     g_propagate_error (error, tmp_error);
 
@@ -896,8 +896,8 @@ retro_core_load_discs (RetroCore  *self,
 }
 
 static gboolean
-retro_core_load_game (RetroCore     *self,
-                      RetroGameInfo *game)
+load_game (RetroCore     *self,
+           RetroGameInfo *game)
 {
   RetroUnloadGame unload_game;
   RetroLoadGame load_game;
@@ -914,7 +914,7 @@ retro_core_load_game (RetroCore     *self,
 
   load_game = retro_module_get_load_game (self->module);
   game_loaded = load_game (game);
-  retro_core_set_game_loaded (self, game_loaded);
+  set_game_loaded (self, game_loaded);
   get_system_av_info = retro_module_get_get_system_av_info (self->module);
   get_system_av_info (&info);
   retro_core_set_system_av_info (self, &info);
@@ -923,7 +923,7 @@ retro_core_load_game (RetroCore     *self,
 }
 
 static gboolean
-retro_core_prepare (RetroCore *self) {
+prepare (RetroCore *self) {
   RetroLoadGame load_game;
   RetroGetSystemAvInfo get_system_av_info;
   gboolean game_loaded;
@@ -931,7 +931,7 @@ retro_core_prepare (RetroCore *self) {
 
   load_game = retro_module_get_load_game (self->module);
   game_loaded = load_game (NULL);
-  retro_core_set_game_loaded (self, game_loaded);
+  set_game_loaded (self, game_loaded);
   get_system_av_info = retro_module_get_get_system_av_info (self->module);
   get_system_av_info (&info);
   retro_core_set_system_av_info (self, &info);
@@ -940,8 +940,8 @@ retro_core_prepare (RetroCore *self) {
 }
 
 static void
-retro_core_load_medias (RetroCore *self,
-                        GError** error)
+load_medias (RetroCore  *self,
+             GError    **error)
 {
   guint length;
   gchar *uri;
@@ -954,7 +954,7 @@ retro_core_load_medias (RetroCore *self,
   length = self->media_uris == NULL ? 0 : g_strv_length (self->media_uris);
 
   if (length == 0) {
-    retro_core_prepare (self);
+    prepare (self);
 
     return;
   }
@@ -962,7 +962,7 @@ retro_core_load_medias (RetroCore *self,
   uri = g_strdup (self->media_uris[0]);
   file = g_file_new_for_uri (uri);
   path = g_file_get_path (file);
-  fullpath = retro_core_get_needs_full_path (self);
+  fullpath = get_needs_full_path (self);
   if (fullpath) {
     game_info = retro_game_info_new (path);
   }
@@ -978,7 +978,7 @@ retro_core_load_medias (RetroCore *self,
       return;
     }
   }
-  if (!retro_core_load_game (self, game_info)) {
+  if (!load_game (self, game_info)) {
     retro_game_info_free (game_info);
     g_free (path);
     g_object_unref (file);
@@ -987,7 +987,7 @@ retro_core_load_medias (RetroCore *self,
     return;
   }
   if (self->disk_control_callback != NULL) {
-    retro_core_load_discs (self, &tmp_error);
+    load_discs (self, &tmp_error);
     if (G_UNLIKELY (tmp_error != NULL)) {
       g_propagate_error (error, tmp_error);
       retro_game_info_free (game_info);
@@ -1326,9 +1326,9 @@ retro_core_boot (RetroCore  *self,
   init = retro_module_get_init (self->module);
   init ();
 
-  retro_core_set_is_initiated (self, TRUE);
+  set_is_initiated (self, TRUE);
 
-  retro_core_load_medias (self, &tmp_error);
+  load_medias (self, &tmp_error);
   if (G_UNLIKELY (tmp_error != NULL)) {
     g_propagate_error (error, tmp_error);
 
@@ -1385,21 +1385,21 @@ retro_core_set_current_media (RetroCore  *self,
   if (self->disk_control_callback == NULL)
     return;
 
-  retro_core_set_disk_ejected (self, TRUE, &tmp_error);
+  set_disk_ejected (self, TRUE, &tmp_error);
   if (tmp_error != NULL) {
     g_propagate_error (error, tmp_error);
 
     return;
   }
 
-  retro_core_set_disk_image_index (self, media_index, &tmp_error);
+  set_disk_image_index (self, media_index, &tmp_error);
   if (tmp_error != NULL) {
     g_propagate_error (error, tmp_error);
 
     return;
   }
 
-  retro_core_set_disk_ejected (self, FALSE, &tmp_error);
+  set_disk_ejected (self, FALSE, &tmp_error);
   if (tmp_error != NULL) {
     g_propagate_error (error, tmp_error);
 
diff --git a/retro-runner/retro-pa-player.c b/retro-runner/retro-pa-player.c
index eed793b..cd677e0 100644
--- a/retro-runner/retro-pa-player.c
+++ b/retro-runner/retro-pa-player.c
@@ -64,8 +64,8 @@ retro_pa_player_init (RetroPaPlayer *self)
 }
 
 static void
-retro_pa_player_prepare_for_sample_rate (RetroPaPlayer *self,
-                                         gdouble        sample_rate)
+prepare_for_sample_rate (RetroPaPlayer *self,
+                         gdouble        sample_rate)
 {
   pa_sample_spec sample_spec = {0};
   gint error;
@@ -139,11 +139,11 @@ resample (RetroPaPlayer *self,
 }
 
 static void
-retro_pa_player_on_audio_output (RetroCore *sender,
-                                 gint16    *data,
-                                 int        length,
-                                 gdouble    sample_rate,
-                                 gpointer   user_data)
+on_audio_output (RetroCore *sender,
+                 gint16    *data,
+                 int        length,
+                 gdouble    sample_rate,
+                 gpointer   user_data)
 {
   RetroPaPlayer *self = RETRO_PA_PLAYER (user_data);
 
@@ -176,7 +176,7 @@ on_iterated (RetroCore     *core,
   }
 
   if (self->simple == NULL || sample_rate != self->sample_rate)
-    retro_pa_player_prepare_for_sample_rate (self, sample_rate);
+    prepare_for_sample_rate (self, sample_rate);
 
   if (self->simple == NULL)
     return;
@@ -222,7 +222,7 @@ retro_pa_player_set_core (RetroPaPlayer *self,
     self->on_audio_output_id =
       g_signal_connect_object (core,
                                "audio-output",
-                               (GCallback) retro_pa_player_on_audio_output,
+                               (GCallback) on_audio_output,
                                self,
                                0);
     self->on_iterated_id =
diff --git a/tests/retro-reftest-file.c b/tests/retro-reftest-file.c
index 97b017c..8ee6235 100644
--- a/tests/retro-reftest-file.c
+++ b/tests/retro-reftest-file.c
@@ -81,7 +81,8 @@ g_object_pointer_unref (GObject **pointer)
     g_object_unref (*pointer);
 }
 
-static gint uint_compare (guint *a, guint *b) {
+static gint
+uint_compare (guint *a, guint *b) {
   if (*a == *b)
     return 0;
 
@@ -198,19 +199,19 @@ retro_reftest_file_init (RetroReftestFile *self)
 }
 
 static GFile *
-retro_reftest_file_get_sibbling (RetroReftestFile *self,
-                                 const gchar      *path)
+get_sibling (RetroReftestFile *self,
+              const gchar      *path)
 {
-  GFile *parent, *sibbling;
+  GFile *parent, *sibling;
 
   if (path[0] == '/')
     return g_file_new_for_path (path);
 
   parent = g_file_get_parent (self->file);
-  sibbling = g_file_get_child (parent, path);
+  sibling = g_file_get_child (parent, path);
   g_object_unref (parent);
 
-  return sibbling;
+  return sibling;
 }
 
 const gchar *
@@ -231,8 +232,8 @@ retro_reftest_file_peek_path (RetroReftestFile *self)
 }
 
 static guint
-retro_reftest_file_str_to_uint (gchar   *string,
-                                GError **error)
+str_to_uint (gchar   *string,
+             GError **error)
 {
   gchar *string_end;
   guint64 number_long;
@@ -288,7 +289,7 @@ retro_reftest_file_str_to_uint (gchar   *string,
 }
 
 static RetroControllerState *
-retro_controller_state_from_string (gchar *string)
+state_from_string (gchar *string)
 {
   RetroControllerState *state;
   RetroControllerType type;
@@ -375,7 +376,7 @@ retro_reftest_file_get_core (RetroReftestFile  *self,
     return NULL;
   }
 
-  core_file = retro_reftest_file_get_sibbling (self, key_file_core);
+  core_file = get_sibling (self, key_file_core);
   g_free (key_file_core);
   path = g_file_get_path (core_file);
   g_object_unref (core_file);
@@ -400,7 +401,7 @@ retro_reftest_file_get_core (RetroReftestFile  *self,
 
   media_uris = g_new0 (gchar *, key_file_medias_length + 1);
   for (i = 0; i < key_file_medias_length; i++) {
-    media_file = retro_reftest_file_get_sibbling (self, key_file_medias[i]);
+    media_file = get_sibling (self, key_file_medias[i]);
     media_uris[i] = g_file_get_uri (media_file);
     g_object_unref (media_file);
   }
@@ -535,7 +536,7 @@ retro_reftest_file_get_frames (RetroReftestFile *self)
       continue;
 
     frame_number_string = groups[i] + strlen (RETRO_REFTEST_FILE_FRAME_GROUP_PREFIX);
-    frame_number = retro_reftest_file_str_to_uint (frame_number_string, &error);
+    frame_number = str_to_uint (frame_number_string, &error);
     if (G_UNLIKELY (error != NULL)) {
       g_critical ("Invalid frame group [%s]: %s", groups[i], error->message);
       g_clear_error (&error);
@@ -616,7 +617,7 @@ retro_reftest_file_get_video (RetroReftestFile  *self,
     return NULL;
   }
 
-  video_file = retro_reftest_file_get_sibbling (self, key_file_video);
+  video_file = get_sibling (self, key_file_video);
   g_free (key_file_video);
 
   return video_file;
@@ -653,7 +654,7 @@ retro_reftest_file_get_controller_states (RetroReftestFile  *self,
 
     controller_number_string = *key_i + strlen (RETRO_REFTEST_FILE_FRAME_CONTROLLER_PREFIX);
     controller_number = g_new (guint, 1);
-    *controller_number = retro_reftest_file_str_to_uint (controller_number_string, &tmp_error);
+    *controller_number = str_to_uint (controller_number_string, &tmp_error);
     if (G_UNLIKELY (tmp_error != NULL)) {
       g_critical ("Invalid controller key [%s]: %s", *key_i, tmp_error->message);
       g_clear_error (&tmp_error);
@@ -666,7 +667,7 @@ retro_reftest_file_get_controller_states (RetroReftestFile  *self,
     states = g_array_new (TRUE, TRUE, sizeof (RetroControllerState *));
     g_array_set_clear_func (states, (GDestroyNotify) g_pointer_free);
     for (input_i = inputs; *input_i != NULL; input_i++) {
-      state = retro_controller_state_from_string (*input_i);
+      state = state_from_string (*input_i);
       if (state == NULL) {
         g_critical ("Invalid controller input: %s. Skipping.", *input_i);
 
diff --git a/tests/retro-reftest.c b/tests/retro-reftest.c
index 2ab604b..468dda1 100644
--- a/tests/retro-reftest.c
+++ b/tests/retro-reftest.c
@@ -250,8 +250,8 @@ pixdata_equal (GdkPixbuf  *test,
 }
 
 static void
-retro_reftest_on_video_output (RetroReftestData *data,
-                               RetroPixdata     *pixdata)
+on_video_output (RetroReftestData *data,
+                 RetroPixdata     *pixdata)
 {
   if (pixdata == NULL)
     return;
@@ -697,7 +697,7 @@ retro_reftest_setup_for_file (GFile *file)
   g_list_free (frames);
   retro_reftest_data_unref (data);
 
-  g_signal_connect_swapped (data->core, "video-output", (GCallback) retro_reftest_on_video_output, data);
+  g_signal_connect_swapped (data->core, "video-output", (GCallback) on_video_output, data);
 }
 
 int


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