[gnome-games/wip/exalm/runner-refactor: 40/58] retro-runner: Don't instantiate in start()



commit 184ad44e903fde35e83e54a1e8cef4f26bf0bbfe
Author: Alexander Mikhaylenko <alexm gnome org>
Date:   Sat Mar 7 03:01:45 2020 +0500

    retro-runner: Don't instantiate in start()
    
    Instead, assume it's always true. As far as I can see, there are no
    codepaths currently where this is not true.

 src/retro/retro-runner.vala | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)
---
diff --git a/src/retro/retro-runner.vala b/src/retro/retro-runner.vala
index cbd0e062..3efaf7db 100644
--- a/src/retro/retro-runner.vala
+++ b/src/retro/retro-runner.vala
@@ -220,13 +220,7 @@ public class Games.RetroRunner : Object, Runner {
        }
 
        public void start () throws Error {
-               if (!is_initialized) {
-                       tmp_save_dir = create_tmp_save_dir ();
-                       if (latest_savestate != null)
-                               latest_savestate.copy_save_dir_to (tmp_save_dir);
-
-                       instantiate_core ();
-               }
+               assert (is_initialized);
 
                if (!is_ready) {
                        reset_metadata (latest_savestate);


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