[retro-gtk] core: Load medias in Core.init()
- From: Adrien Plazas <aplazas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [retro-gtk] core: Load medias in Core.init()
- Date: Fri, 7 Jul 2017 09:07:08 +0000 (UTC)
commit fde726b79aa7b516aef041433f065ca164c8c434
Author: Adrien Plazas <kekun plazas laposte net>
Date: Fri Jul 7 09:08:58 2017 +0200
core: Load medias in Core.init()
Also make the ancient loading mechanisms private to avoid any conflict.
https://bugzilla.gnome.org/show_bug.cgi?id=777489
demos/retro-demo.c | 1 -
retro-gtk/core.vala | 13 ++++++++++---
2 files changed, 10 insertions(+), 4 deletions(-)
---
diff --git a/demos/retro-demo.c b/demos/retro-demo.c
index ef60be7..d55e67e 100644
--- a/demos/retro-demo.c
+++ b/demos/retro-demo.c
@@ -46,7 +46,6 @@ retro_demo_open (GApplication *application,
g_signal_emit_by_name (self->core, "init");
- retro_core_prepare (self->core);
g_application_activate (application);
}
diff --git a/retro-gtk/core.vala b/retro-gtk/core.vala
index 5c8b5c5..3e1c972 100644
--- a/retro-gtk/core.vala
+++ b/retro-gtk/core.vala
@@ -155,7 +155,7 @@ public class Core : Object {
*
* The Core can set it to let the frontend insert and eject disks images.
*/
- public DiskControl disk_control_interface { internal set; get; }
+ internal DiskControl disk_control_interface { set; get; }
private weak Input _input_interface;
private ulong input_controller_connected_id;
@@ -264,6 +264,13 @@ public class Core : Object {
init_input ();
is_initiated = true;
+
+ try {
+ load_medias ();
+ }
+ catch (Error e) {
+ debug (e.message);
+ }
}
public extern void set_medias ([CCode (array_null_terminated = true, array_length = false)] string[]
uris);
@@ -308,7 +315,7 @@ public class Core : Object {
* @param game information to load the game
* @return false if the loading failed, true otherwise
*/
- public extern bool load_game (GameInfo game);
+ private extern bool load_game (GameInfo game);
/**
* Prepare the standalone core.
@@ -317,7 +324,7 @@ public class Core : Object {
*
* @return false if the preparation failed, true otherwise
*/
- public extern bool prepare ();
+ private extern bool prepare ();
/**
* Gets the size of a region of memory.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]