frontend: allow sstates without cd img
authornotaz <notasas@gmail.com>
Wed, 21 Nov 2012 22:48:51 +0000 (00:48 +0200)
committernotaz <notasas@gmail.com>
Sat, 24 Nov 2012 02:25:25 +0000 (04:25 +0200)
frontend/main.c

index f5da18b..29d2c25 100644 (file)
@@ -586,6 +586,12 @@ int main(int argc, char *argv[])
                }
        }
 
+       if (loadst_f) {
+               int ret = LoadState(loadst_f);
+               printf("%s state file: %s\n", ret ? "failed to load" : "loaded", loadst_f);
+               ready_to_go |= ret == 0;
+       }
+
        if (ready_to_go) {
                menu_prepare_emu();
 
@@ -594,10 +600,6 @@ int main(int argc, char *argv[])
                        int ret = emu_load_state(loadst - 1);
                        printf("%s state %d\n", ret ? "failed to load" : "loaded", loadst);
                }
-               if (loadst_f) {
-                       int ret = LoadState(loadst_f);
-                       printf("%s state file: %s\n", ret ? "failed to load" : "loaded", loadst_f);
-               }
        }
        else
                menu_loop();