[retro-gtk/wip/aplazas/c-port: 28/34] core: Rename init() to boot()



commit 1a8da46d3755e951cc34169ca396e457d3bb4144
Author: Adrien Plazas <kekun plazas laposte net>
Date:   Mon Sep 25 13:41:05 2017 +0200

    core: Rename init() to boot()
    
    This will avoid naming conflict with the object initialization function.

 demos/retro-demo.c     |    2 +-
 retro-gtk/core.vala    |    2 +-
 retro-gtk/retro-core.c |   10 +++++++++-
 3 files changed, 11 insertions(+), 3 deletions(-)
---
diff --git a/demos/retro-demo.c b/demos/retro-demo.c
index 39078e9..19e9bea 100644
--- a/demos/retro-demo.c
+++ b/demos/retro-demo.c
@@ -45,7 +45,7 @@ retro_demo_open (GApplication  *application,
   if (self->core == NULL)
     return;
 
-  retro_core_init (self->core, &error);
+  retro_core_boot (self->core, &error);
   if (error != NULL) {
     g_debug ("Couldn't initialize the Libretro core: %s", error->message);
     g_error_free (error);
diff --git a/retro-gtk/core.vala b/retro-gtk/core.vala
index 6dc96d1..8199b31 100644
--- a/retro-gtk/core.vala
+++ b/retro-gtk/core.vala
@@ -124,7 +124,7 @@ public class Core : Object {
         *
         * Must be called before loading a game and running the core.
         */
-       public extern void init () throws Error;
+       public extern void boot () throws Error;
 
        public extern void set_medias ([CCode (array_null_terminated = true, array_length = false)] string[] 
uris);
 
diff --git a/retro-gtk/retro-core.c b/retro-gtk/retro-core.c
index 1c8fff1..350f09c 100644
--- a/retro-gtk/retro-core.c
+++ b/retro-gtk/retro-core.c
@@ -702,8 +702,16 @@ on_key_event (GtkWidget   *widget,
 
 /* Public */
 
+/**
+ * retro_core_boot:
+ * @self: a #RetroCore
+ * @error: return location for a #GError, or %NULL
+ *
+ * This initializes @self, loads its available options and loads the medias. You
+ * need to boot @self before using some of its methods.
+ */
 void
-retro_core_init (RetroCore  *self,
+retro_core_boot (RetroCore  *self,
                  GError    **error)
 {
   RetroCoreEnvironmentInternal *internal;


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