libretro: only pass fb to video_cb when it's updated
[pcsx_rearmed.git] / frontend / main.c
index f5da18b..59b68d5 100644 (file)
@@ -31,6 +31,8 @@
 #include "libpicofe/input.h"
 #include "libpicofe/plat.h"
 #include "libpicofe/readpng.h"
+
+static void toggle_fast_forward(int force_off);
 #endif
 #ifndef BOOT_MSG
 #define BOOT_MSG "Booting up..."
@@ -54,8 +56,6 @@ enum sched_action emu_action, emu_action_old;
 char hud_msg[64];
 int hud_new_msg;
 
-static void toggle_fast_forward(int force_off);
-
 static void make_path(char *buf, size_t size, const char *dir, const char *fname)
 {
        if (fname)
@@ -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();