[gnome-games] dreamcast: Replace DreamcastGame by GenericGame
- From: Adrien Plazas <aplazas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-games] dreamcast: Replace DreamcastGame by GenericGame
- Date: Fri, 25 Mar 2016 06:45:08 +0000 (UTC)
commit 916f3b162e79459b03d106c6ace22ff81059aa10
Author: Adrien Plazas <kekun plazas laposte net>
Date: Wed Mar 23 09:04:09 2016 +0100
dreamcast: Replace DreamcastGame by GenericGame
plugins/dreamcast/src/Makefile.am | 1 -
plugins/dreamcast/src/dreamcast-game.vala | 46 ---------------------------
plugins/dreamcast/src/dreamcast-plugin.vala | 12 ++++++-
3 files changed, 11 insertions(+), 48 deletions(-)
---
diff --git a/plugins/dreamcast/src/Makefile.am b/plugins/dreamcast/src/Makefile.am
index 25c5683..7478543 100644
--- a/plugins/dreamcast/src/Makefile.am
+++ b/plugins/dreamcast/src/Makefile.am
@@ -6,7 +6,6 @@ libgames_dreamcast_plugin_la_DEPENDENCIES = \
$(NULL)
libgames_dreamcast_plugin_la_SOURCES = \
- dreamcast-game.vala \
dreamcast-header.vala \
dreamcast-plugin.vala \
dreamcast-uid.vala \
diff --git a/plugins/dreamcast/src/dreamcast-plugin.vala b/plugins/dreamcast/src/dreamcast-plugin.vala
index c7f2a02..a938331 100644
--- a/plugins/dreamcast/src/dreamcast-plugin.vala
+++ b/plugins/dreamcast/src/dreamcast-plugin.vala
@@ -2,6 +2,7 @@
private class Games.DreamcastPlugin : Object, Plugin {
private const string MIME_TYPE = "application/x-dc-rom";
+ private const string MODULE_BASENAME = "libretro-dreamcast.so";
public GameSource get_game_source () throws Error {
var query = new MimeTypeTrackerQuery (MIME_TYPE, game_for_uri);
@@ -13,7 +14,16 @@ private class Games.DreamcastPlugin : Object, Plugin {
}
private static Game game_for_uri (string uri) throws Error {
- return new DreamcastGame (uri);
+ var file = File.new_for_uri (uri);
+ var header = new DreamcastHeader (file);
+ header.check_validity ();
+
+ var uid = new DreamcastUid (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]