[gnome-games/wip/exalm/runner-refactor: 55/56] retro-runner: Move deinit() to where it's used
- From: Alexander Mikhaylenko <alexm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-games/wip/exalm/runner-refactor: 55/56] retro-runner: Move deinit() to where it's used
- Date: Sat, 7 Mar 2020 12:45:17 +0000 (UTC)
commit 3dd56ceb9415c4b47864fb12fb1c2179719b8613
Author: Alexander Mikhaylenko <alexm gnome org>
Date: Sat Mar 7 17:04:16 2020 +0500
retro-runner: Move deinit() to where it's used
src/retro/retro-runner.vala | 44 ++++++++++++++++++++++----------------------
1 file changed, 22 insertions(+), 22 deletions(-)
---
diff --git a/src/retro/retro-runner.vala b/src/retro/retro-runner.vala
index 6d73f0e6..0de73171 100644
--- a/src/retro/retro-runner.vala
+++ b/src/retro/retro-runner.vala
@@ -287,6 +287,28 @@ public class Games.RetroRunner : Object, Runner {
stopped ();
}
+ private void deinit () {
+ if (!core_loaded)
+ return;
+
+ settings.changed["video-filter"].disconnect (on_video_filter_changed);
+
+ input_manager = null;
+
+ if (core.is_initiated)
+ core.stop ();
+
+ core = null;
+
+ if (view != null) {
+ view.set_core (null);
+ view = null;
+ }
+
+ _running = false;
+ core_loaded = false;
+ }
+
public Savestate? try_create_savestate (bool is_automatic) {
if (!supports_savestates)
return null;
@@ -346,28 +368,6 @@ public class Games.RetroRunner : Object, Runner {
return snapshot_manager.get_snapshots ();
}
- private void deinit () {
- if (!core_loaded)
- return;
-
- settings.changed["video-filter"].disconnect (on_video_filter_changed);
-
- input_manager = null;
-
- if (core.is_initiated)
- core.stop ();
-
- core = null;
-
- if (view != null) {
- view.set_core (null);
- view = null;
- }
-
- _running = false;
- core_loaded = false;
- }
-
public InputMode[] get_available_input_modes () {
if (input_capabilities == null)
return { InputMode.GAMEPAD };
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]