[gnome-games] retro: Set the Libretro core system directory
- From: Adrien Plazas <aplazas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-games] retro: Set the Libretro core system directory
- Date: Fri, 10 Feb 2017 12:06:41 +0000 (UTC)
commit 8e6ea0cd72834bb2fffec5275cb50cd310d5e718
Author: Adrien Plazas <kekun plazas laposte net>
Date: Fri Feb 10 12:04:35 2017 +0100
retro: Set the Libretro core system directory
Set the Libretro core system directory to a platform specific directory
in the config directory.
This allows the Libretro cores to look for firmwares in a well defined
place.
https://bugzilla.gnome.org/show_bug.cgi?id=778447
src/retro/retro-runner.vala | 4 ++++
src/ui/application.vala | 6 ++++++
2 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/src/retro/retro-runner.vala b/src/retro/retro-runner.vala
index c36a7d0..eea4898 100644
--- a/src/retro/retro-runner.vala
+++ b/src/retro/retro-runner.vala
@@ -203,6 +203,10 @@ public class Games.RetroRunner : Object, Runner {
core = new Retro.Core (module_path);
audio = new RetroGtk.PaPlayer ();
+ var platforms_dir = Application.get_platforms_dir ();
+ var platform = core_source.get_platform ();
+ core.system_directory = @"$platforms_dir/$platform/system";
+
video.set_core (core);
audio.set_core (core);
core.input_interface = input_manager;
diff --git a/src/ui/application.vala b/src/ui/application.vala
index 4eac304..5d56a95 100644
--- a/src/ui/application.vala
+++ b/src/ui/application.vala
@@ -77,6 +77,12 @@ public class Games.Application : Gtk.Application {
return @"$config_dir/gnome-games";
}
+ public static string get_platforms_dir () {
+ var config_dir = get_config_dir ();
+
+ return @"$config_dir/platforms";
+ }
+
public static string get_covers_dir () {
var cache_dir = get_cache_dir ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]