[retro-gtk] demo: Use args after the first one as medias
- From: Adrien Plazas <aplazas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [retro-gtk] demo: Use args after the first one as medias
- Date: Wed, 25 Apr 2018 21:10:57 +0000 (UTC)
commit edcff5af19e0248bd53b51351129229350494ab1
Author: Adrien Plazas <kekun plazas laposte net>
Date: Wed Apr 25 23:09:35 2018 +0200
demo: Use args after the first one as medias
This allow to run cores with medias.
demos/retro-demo.c | 11 +++++++++++
1 file changed, 11 insertions(+)
---
diff --git a/demos/retro-demo.c b/demos/retro-demo.c
index 405b90d..49a1579 100644
--- a/demos/retro-demo.c
+++ b/demos/retro-demo.c
@@ -45,6 +45,17 @@ retro_demo_open (GApplication *application,
if (self->core == NULL)
return;
+ if (n_files > 1) {
+ gchar **medias;
+ gint i;
+
+ medias = g_new0 (gchar *, n_files);
+ for (i = 1; i < n_files; i++)
+ medias[i - 1] = g_file_get_uri (files[i]);
+ retro_core_set_medias (self->core, (const gchar *const *) medias);
+ g_strfreev (medias);
+ }
+
retro_core_boot (self->core, &error);
if (error != NULL) {
g_debug ("Couldn't initialize the Libretro core: %s", error->message);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]