[gnome-games] Revert Nintendo 64 and subprocess changes



commit 7132090a8f39e820ac5bc4a13b9c10d73f7b1f32
Author: Alexander Mikhaylenko <alexm gnome org>
Date:   Mon Feb 10 22:51:40 2020 +0500

    Revert Nintendo 64 and subprocess changes
    
    OpenGL and subprocess changes aren't merged into retro-gtk yet, they
    weren't supposed to be merged already.
    
    Revert commits:
    * 63e6b6d8a55d53b092a1d804cec99b3118c7f357
    * d3290d465507c34a2710407d2527b18d73f2dff8
    * 29d701ecb20f922b8255bf0a5a32d2252e54de6b
    * 5071fa4a88ed6096cbe87fec596f5112d625131e
    * f89b2a2767018bcedfcf6280275858a08ae38caa
    * 411a3a3a13d5819bcb6465e6a4ecf7f68b21fa26
    * 9fbc41d2b1ac9c047dfc3508ee27225c97a4b5b0
    * 54ea820439df798b4d5cbf9e8c869b3ebf47b2c6
    * 278b3461ea31d44d1887c581031a1ca981e66dfc

 data/ui/error-display.ui                           |  10 --
 flatpak/libretro-cores/libretro-parallel_n64.json  |  32 -----
 .../libretro-cores/parallel_n64-Makefile.install   |   4 -
 flatpak/libretro-cores/parallel_n64.libretro       |  18 ---
 flatpak/org.gnome.Games.json                       |   4 +-
 meson_options.txt                                  |   1 -
 plugins/meson.build                                |   1 -
 plugins/nintendo-64/data/meson.build               |   7 --
 plugins/nintendo-64/data/nintendo-64.gresource.xml |   7 --
 plugins/nintendo-64/data/nintendo-64.plugin        |   6 -
 .../nintendo-64/data/ui/nintendo-64-pak-player.ui  |  39 -------
 .../data/ui/nintendo-64-pak-switcher.ui            |  49 --------
 plugins/nintendo-64/meson.build                    |   2 -
 plugins/nintendo-64/src/meson.build                |  22 ----
 .../nintendo-64/src/nintendo-64-pak-player.vala    |  43 -------
 .../nintendo-64/src/nintendo-64-pak-switcher.vala  |  68 -----------
 plugins/nintendo-64/src/nintendo-64-pak.vala       |  40 -------
 plugins/nintendo-64/src/nintendo-64-platform.vala  |  11 --
 plugins/nintendo-64/src/nintendo-64-plugin.vala    |  68 -----------
 plugins/nintendo-64/src/nintendo-64-runner.vala    | 130 ---------------------
 plugins/nintendo-64/src/nintendo-64-savestate.vala |  33 ------
 po/POTFILES.in                                     |   3 -
 po/POTFILES.skip                                   |   2 -
 src/core/runner.vala                               |   1 -
 src/retro/retro-runner.vala                        |  25 ++--
 src/retro/retro-simple-types.vala                  |   1 +
 src/ui/display-box.vala                            |   7 --
 src/ui/display-view.vala                           |  26 +----
 src/ui/error-display.vala                          |  10 --
 29 files changed, 10 insertions(+), 660 deletions(-)
---
diff --git a/data/ui/error-display.ui b/data/ui/error-display.ui
index 0ebc9edd..dd61af6f 100644
--- a/data/ui/error-display.ui
+++ b/data/ui/error-display.ui
@@ -40,15 +40,5 @@
         <property name="wrap">True</property>
       </object>
     </child>
-    <child>
-      <object class="GtkButton" id="restart_btn">
-        <property name="visible">True</property>
-        <property name="label">_Restart Game</property>
-        <property name="use-underline">True</property>
-        <property name="margin-top">12</property>
-        <property name="halign">center</property>
-        <property name="action-name">display.restart</property>
-      </object>
-    </child>
   </template>
 </interface>
diff --git a/flatpak/org.gnome.Games.json b/flatpak/org.gnome.Games.json
index 0498c202..09e20e3b 100644
--- a/flatpak/org.gnome.Games.json
+++ b/flatpak/org.gnome.Games.json
@@ -79,7 +79,6 @@
         "libretro-cores/libretro-mednafen_wswan.json",
         "libretro-cores/libretro-mgba.json",
         "libretro-cores/libretro-nestopia.json",
-        "libretro-cores/libretro-parallel_n64.json",
         "libretro-cores/libretro-pcsx_rearmed.json",
         "libretro-cores/libretro-prboom.json",
         "libretro-cores/libretro-prosystem.json",
@@ -220,8 +219,7 @@
             "sources" : [
                 {
                     "type" : "git",
-                    "url" : "https://gitlab.gnome.org/exalm/retro-gtk.git";,
-                    "branch" : "wip/exalm/opengl"
+                    "url" : "https://gitlab.gnome.org/GNOME/retro-gtk.git";
                 }
             ]
         },
diff --git a/meson_options.txt b/meson_options.txt
index fa589741..1a9844fd 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -17,7 +17,6 @@ option ('libretro-plugin',      description: 'Support for Libretro games',
 option ('love-plugin',          description: 'Support for LÖVE games',          type: 'boolean')
 option ('mame-plugin',          description: 'Support for MAME games',          type: 'boolean')
 option ('ms-dos-plugin',        description: 'Support for MS-DOS games',        type: 'boolean')
-option ('nintendo-64-plugin',   description: 'Support for Nintendo 64 games',   type: 'boolean')
 option ('nintendo-ds-plugin',   description: 'Support for Nintendo DS games',   type: 'boolean')
 option ('playstation-plugin',   description: 'Support for PlayStation games',   type: 'boolean')
 option ('sega-cd-plugin',       description: 'Support for Sega CD games',       type: 'boolean')
diff --git a/plugins/meson.build b/plugins/meson.build
index f15025bb..3fe8b172 100644
--- a/plugins/meson.build
+++ b/plugins/meson.build
@@ -6,7 +6,6 @@ plugins = [
   'love',
   'mame',
   'ms-dos',
-  'nintendo-64',
   'nintendo-ds',
   'playstation',
   'sega-cd',
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 8ce26980..fca7fedd 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -35,9 +35,6 @@ plugins/love/src/love-plugin.vala
 plugins/mame/src/mame-game-uri-adapter.vala
 plugins/mame/src/mame-plugin.vala
 plugins/ms-dos/src/ms-dos-plugin.vala
-plugins/nintendo-64/data/ui/nintendo-64-pak-switcher.ui
-plugins/nintendo-64/src/nintendo-64-pak-player.vala
-plugins/nintendo-64/src/nintendo-64-plugin.vala
 plugins/nintendo-ds/data/ui/nintendo-ds-layout-switcher.ui
 plugins/nintendo-ds/src/nintendo-ds-layout-switcher.vala
 plugins/nintendo-ds/src/nintendo-ds-layout.vala
diff --git a/po/POTFILES.skip b/po/POTFILES.skip
index 8bbec8bf..543b3506 100644
--- a/po/POTFILES.skip
+++ b/po/POTFILES.skip
@@ -11,8 +11,6 @@ plugins/love/src/love-plugin.c
 plugins/mame/src/mame-game-uri-adapter.c
 plugins/mame/src/mame-plugin.c
 plugins/ms-dos/src/ms-dos-plugin.c
-plugins/nintendo-64/src/nintendo-64-pak-player.c
-plugins/nintendo-64/src/nintendo-64-plugin.c
 plugins/nintendo-ds/src/nintendo-ds-layout.c
 plugins/nintendo-ds/src/nintendo-ds-layout-switcher.c
 plugins/nintendo-ds/src/nintendo-ds-plugin.c
diff --git a/src/core/runner.vala b/src/core/runner.vala
index 83b4e3b2..1bedceca 100644
--- a/src/core/runner.vala
+++ b/src/core/runner.vala
@@ -3,7 +3,6 @@
 public interface Games.Runner : Object {
        public signal void new_savestate_created ();
        public signal void stopped ();
-       public signal void crash (string message);
 
        public abstract bool can_fullscreen { get; }
        public abstract bool can_resume { get; }
diff --git a/src/retro/retro-runner.vala b/src/retro/retro-runner.vala
index ee7dae45..ee654f33 100644
--- a/src/retro/retro-runner.vala
+++ b/src/retro/retro-runner.vala
@@ -62,7 +62,6 @@ public class Games.RetroRunner : Object, Runner {
 
        private bool is_initialized;
        private bool is_ready;
-       private bool is_error;
 
        public RetroRunnerBuilder builder {
                construct {
@@ -195,12 +194,11 @@ public class Games.RetroRunner : Object, Runner {
        }
 
        public void load_previewed_savestate () throws Error {
+               core.stop ();
+
                tmp_live_savestate = previewed_savestate.clone_in_tmp ();
                core.save_directory = tmp_live_savestate.get_save_directory_path ();
                load_save_ram (previewed_savestate.get_save_ram_path ());
-
-               core.iteration (true); // Needed to finish preparing some cores.
-
                core.load_state (previewed_savestate.get_snapshot_path ());
 
                if (previewed_savestate.has_media_data ())
@@ -238,7 +236,7 @@ public class Games.RetroRunner : Object, Runner {
                        is_ready = true;
                }
 
-               core.iteration (true); // Needed to finish preparing some cores.
+               core.iteration (); // Needed to finish preparing some cores.
                core.reset ();
 
                core.run ();
@@ -276,10 +274,6 @@ public class Games.RetroRunner : Object, Runner {
                _input_mode = input_manager.input_mode;
 
                core.shutdown.connect (stop);
-               core.crashed.connect ((core, error) => {
-                       is_error = true;
-                       crash (error);
-               });
 
                running = false;
 
@@ -293,11 +287,8 @@ public class Games.RetroRunner : Object, Runner {
                settings.changed["video-filter"].disconnect (on_video_filter_changed);
 
                core = null;
-
-               if (view != null) {
-                       view.set_core (null);
-                       view = null;
-               }
+               view.set_core (null);
+               view = null;
 
                input_manager = null;
 
@@ -363,10 +354,8 @@ public class Games.RetroRunner : Object, Runner {
                if (!running)
                        return;
 
-               if (!is_error) {
-                       current_state_pixbuf = view.get_pixbuf ();
-                       core.stop ();
-               }
+               current_state_pixbuf = view.get_pixbuf ();
+               core.stop ();
 
                //FIXME:
                // In the future here there will be code which updates the currently
diff --git a/src/retro/retro-simple-types.vala b/src/retro/retro-simple-types.vala
index 6fc3b0f7..0910f394 100644
--- a/src/retro/retro-simple-types.vala
+++ b/src/retro/retro-simple-types.vala
@@ -15,6 +15,7 @@ namespace Games {
                { "application/x-gba-rom", true, "GameBoyAdvance", "game-boy-advance" },
                { "application/x-genesis-32x-rom", true, "Sega32X", "mega-drive-32x" },
                { "application/x-genesis-rom", true, "SegaGenesis", "mega-drive" },
+               { "application/x-n64-rom", true, "Nintendo64", "nintendo-64" },
                { "application/x-neo-geo-pocket-color-rom", true, "NeoGeoPocketColor", "neo-geo-pocket" }, // 
The prefix is the same as the Neo Geo Pocket type for backward compatibility.
                { "application/x-neo-geo-pocket-rom", true, "NeoGeoPocket", "neo-geo-pocket" },
                { "application/x-nes-rom", true, "NintendoEntertainmentSystem", "nes" },
diff --git a/src/ui/display-box.vala b/src/ui/display-box.vala
index 261faf1f..45db5c9a 100644
--- a/src/ui/display-box.vala
+++ b/src/ui/display-box.vala
@@ -4,7 +4,6 @@
 private class Games.DisplayBox : Gtk.Bin {
        public signal void back ();
        public signal void snapshots_hidden ();
-       public signal void restart ();
 
        private bool _is_fullscreen;
        public bool is_fullscreen {
@@ -79,12 +78,6 @@ private class Games.DisplayBox : Gtk.Bin {
                error_display.running_game_failed (game, error_message);
        }
 
-       public void display_game_crashed (Game game, string error_message) {
-               stack.visible_child = error_display;
-               is_showing_snapshots = false;
-               error_display.game_crashed (game, error_message);
-       }
-
        [GtkCallback]
        private void on_fullscreen_header_bar_back () {
                back ();
diff --git a/src/ui/display-view.vala b/src/ui/display-view.vala
index 5c08a753..e7421ee3 100644
--- a/src/ui/display-view.vala
+++ b/src/ui/display-view.vala
@@ -57,7 +57,6 @@ private class Games.DisplayView : Object, UiView {
        private QuitDialog quit_dialog;
 
        private long focus_out_timeout_id;
-       private Game game;
 
        private SimpleActionGroup action_group;
        private const ActionEntry[] action_entries = {
@@ -165,9 +164,6 @@ private class Games.DisplayView : Object, UiView {
                }
 
                // Shortcuts for the Savestates manager
-               if (runner == null)
-                       return false;
-
                if (!runner.supports_savestates)
                        return false;
 
@@ -288,8 +284,6 @@ private class Games.DisplayView : Object, UiView {
                if (runner != null && !quit_game ())
                        return;
 
-               this.game = game;
-
                if (run_game_cancellable != null)
                        run_game_cancellable.cancel ();
 
@@ -318,19 +312,6 @@ private class Games.DisplayView : Object, UiView {
                header_bar.media_set = runner.media_set;
                box.header_bar.media_set = runner.media_set;
 
-               runner.crash.connect (message => {
-                       runner.stop ();
-                       reset_display_page ();
-
-                       if (run_game_cancellable != null)
-                               run_game_cancellable.cancel ();
-
-                       if (quit_game_cancellable != null)
-                               quit_game_cancellable.cancel ();
-
-                       box.display_game_crashed (game, message);
-               });
-
                update_actions ();
 
                is_fullscreen = settings.get_boolean ("fullscreen") && can_fullscreen;
@@ -604,12 +585,7 @@ private class Games.DisplayView : Object, UiView {
        }
 
        private void restart () {
-               if (runner != null && runner.is_integrated) {
+               if (runner != null && runner.is_integrated)
                        runner.restart ();
-                       return;
-               }
-
-               if (game != null)
-                       run_game (game);
        }
 }
diff --git a/src/ui/error-display.vala b/src/ui/error-display.vala
index 2d2c6e54..6369ef08 100644
--- a/src/ui/error-display.vala
+++ b/src/ui/error-display.vala
@@ -6,8 +6,6 @@ private class Games.ErrorDisplay : Gtk.Box {
        private Gtk.Label primary_label;
        [GtkChild]
        private Gtk.Label secondary_label;
-       [GtkChild]
-       private Gtk.Button restart_btn;
 
        public void running_game_failed (Game game, string message) {
                string title;
@@ -17,14 +15,6 @@ private class Games.ErrorDisplay : Gtk.Box {
                        title = _("Oops! Unable to run the game");
 
                set_labels (title, message);
-               restart_btn.hide ();
-       }
-
-       public void game_crashed (Game game, string message) {
-               var title = _("Oops! The game “%s” crashed unexpectedly").printf (game.name);
-
-               set_labels (title, message);
-               restart_btn.show ();
        }
 
        private void set_labels (string primary, string secondary) {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]