[retro-gtk] retro-gobject: Remove rarely used Core.unload_game()
- From: Adrien Plazas <aplazas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [retro-gtk] retro-gobject: Remove rarely used Core.unload_game()
- Date: Thu, 26 Jan 2017 10:31:39 +0000 (UTC)
commit 0ee99a6fb09f6048064957e5bcf6e2b763ab3dc7
Author: Adrien Plazas <kekun plazas laposte net>
Date: Wed Jan 25 18:55:09 2017 +0100
retro-gobject: Remove rarely used Core.unload_game()
Replaces the two private calls to Core.unload_game() by its small
content.
https://bugzilla.gnome.org/show_bug.cgi?id=777489
retro-gobject/core.vala | 22 +++++++++++-----------
1 files changed, 11 insertions(+), 11 deletions(-)
---
diff --git a/retro-gobject/core.vala b/retro-gobject/core.vala
index 224e9c4..fa0cd5a 100644
--- a/retro-gobject/core.vala
+++ b/retro-gobject/core.vala
@@ -242,7 +242,12 @@ public class Core : Object {
}
~Core () {
- if (game_loaded) unload_game ();
+ if (game_loaded) {
+ push_cb_data ();
+ module.unload_game ();
+ pop_cb_data ();
+ }
+
deinit ();
}
@@ -327,7 +332,11 @@ public class Core : Object {
* @return false if the loading failed, true otherwise
*/
public bool load_game (GameInfo game) {
- if (game_loaded) unload_game ();
+ if (game_loaded) {
+ push_cb_data ();
+ module.unload_game ();
+ pop_cb_data ();
+ }
push_cb_data ();
game_loaded = module.load_game (game);
@@ -340,15 +349,6 @@ public class Core : Object {
}
/**
- * Unloads a currently loaded game.
- */
- public void unload_game () {
- push_cb_data ();
- module.unload_game ();
- pop_cb_data ();
- }
-
- /**
* Gets the size of a region of memory.
*
* @param id the region of memory
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]