[gnome-games/wip/aplazas/run-uri: 6/21] mame: Yield on MameGameUriAdapter.game_for_uri()
- From: Adrien Plazas <aplazas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-games/wip/aplazas/run-uri: 6/21] mame: Yield on MameGameUriAdapter.game_for_uri()
- Date: Thu, 13 Apr 2017 14:22:05 +0000 (UTC)
commit 863232116bb2c1b8edf7e8f41c5b3dc3f999786f
Author: Adrien Plazas <kekun plazas laposte net>
Date: Thu Apr 13 15:34:50 2017 +0200
mame: Yield on MameGameUriAdapter.game_for_uri()
Yields before returning a new game. This is a safe default as the method
is async and hence is expected to yield at some point.
plugins/mame/src/mame-game-uri-adapter.vala | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/plugins/mame/src/mame-game-uri-adapter.vala b/plugins/mame/src/mame-game-uri-adapter.vala
index beea624..ee18949 100644
--- a/plugins/mame/src/mame-game-uri-adapter.vala
+++ b/plugins/mame/src/mame-game-uri-adapter.vala
@@ -29,6 +29,9 @@ private class Games.MameGameUriAdapter : GameUriAdapter, Object {
var core_source = new RetroCoreSource (PLATFORM, { SEARCHED_MIME_TYPE, SPECIFIC_MIME_TYPE });
var runner = new RetroRunner (core_source, uri, uid, title);
+ Idle.add (this.game_for_uri.callback);
+ yield;
+
return new GenericGame (title, icon, cover, runner);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]