[gnome-games] wii: Replace WiiGame by GenericGame
- From: Adrien Plazas <aplazas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-games] wii: Replace WiiGame by GenericGame
- Date: Fri, 25 Mar 2016 06:46:08 +0000 (UTC)
commit b8945027a712c2547b327fe0c1932f8cae1d27a3
Author: Adrien Plazas <kekun plazas laposte net>
Date: Fri Mar 25 07:15:38 2016 +0100
wii: Replace WiiGame by GenericGame
plugins/wii/src/Makefile.am | 1 -
plugins/wii/src/wii-game.vala | 46 ---------------------------------------
plugins/wii/src/wii-plugin.vala | 12 +++++++++-
3 files changed, 11 insertions(+), 48 deletions(-)
---
diff --git a/plugins/wii/src/Makefile.am b/plugins/wii/src/Makefile.am
index f699af6..abb66c5 100644
--- a/plugins/wii/src/Makefile.am
+++ b/plugins/wii/src/Makefile.am
@@ -6,7 +6,6 @@ libgames_wii_plugin_la_DEPENDENCIES = \
$(NULL)
libgames_wii_plugin_la_SOURCES = \
- wii-game.vala \
wii-header.vala \
wii-plugin.vala \
wii-uid.vala \
diff --git a/plugins/wii/src/wii-plugin.vala b/plugins/wii/src/wii-plugin.vala
index af37e20..5e91bb5 100644
--- a/plugins/wii/src/wii-plugin.vala
+++ b/plugins/wii/src/wii-plugin.vala
@@ -2,6 +2,7 @@
private class Games.WiiPlugin : Object, Plugin {
private const string MIME_TYPE = "application/x-wii-rom";
+ private const string MODULE_BASENAME = "libretro-wii.so";
public GameSource get_game_source () throws Error {
var query = new MimeTypeTrackerQuery (MIME_TYPE, game_for_uri);
@@ -13,7 +14,16 @@ private class Games.WiiPlugin : Object, Plugin {
}
private static Game game_for_uri (string uri) throws Error {
- return new WiiGame (uri);
+ var file = File.new_for_uri (uri);
+ var header = new WiiHeader (file);
+ header.check_validity ();
+
+ var uid = new WiiUid (header);
+ var title = new FilenameTitle (uri);
+ var cover = new DummyCover ();
+ var runner = new RetroRunner (MODULE_BASENAME, uri, uid);
+
+ return new GenericGame (title, cover, runner);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]