frontend: avoid loading msg when not needed
authornotaz <notasas@gmail.com>
Sat, 10 Nov 2012 20:23:37 +0000 (22:23 +0200)
committernotaz <notasas@gmail.com>
Sat, 10 Nov 2012 20:23:37 +0000 (22:23 +0200)
frontend/libretro.c
frontend/main.c
frontend/main.h
frontend/menu.c
maemo/main.c

index 11bcef4..82e6f65 100644 (file)
@@ -274,7 +274,7 @@ bool retro_load_game(const struct retro_game_info *info)
                printf("could not load CD-ROM!\n");
                return false;
        }
-       emu_on_new_cd();
+       emu_on_new_cd(0);
 
        return true;
 }
index c1ceb57..4803198 100644 (file)
@@ -396,7 +396,7 @@ out:
        fclose(f);
 }
 
-void emu_on_new_cd(void)
+void emu_on_new_cd(int show_hud_msg)
 {
        ClearAllCheats();
        parse_cwcheat();
@@ -406,8 +406,10 @@ void emu_on_new_cd(void)
                printf("----------------------------------------------------------\n");
        }
 
-       snprintf(hud_msg, sizeof(hud_msg), BOOT_MSG);
-       hud_new_msg = 3;
+       if (show_hud_msg) {
+               snprintf(hud_msg, sizeof(hud_msg), BOOT_MSG);
+               hud_new_msg = 3;
+       }
 }
 
 int emu_core_preinit(void)
@@ -563,7 +565,7 @@ int main(int argc, char *argv[])
                                printf(_("Could not load CD-ROM!\n"));
                                return -1;
                        }
-                       emu_on_new_cd();
+                       emu_on_new_cd(!loadst);
                        ready_to_go = 1;
                }
        }
index 44c1b6a..7e5dc47 100644 (file)
@@ -42,7 +42,7 @@ int emu_core_preinit(void);
 int emu_core_init(void);
 
 void emu_set_default_config(void);
-void emu_on_new_cd(void);
+void emu_on_new_cd(int show_hud_msg);
 
 int get_state_filename(char *buf, int size, int i);
 int emu_check_state(int slot);
index 333bdb6..a984bbf 100644 (file)
@@ -1849,7 +1849,7 @@ static int run_cd_image(const char *fname)
                return -1;
        }
 
-       emu_on_new_cd();
+       emu_on_new_cd(1);
        ready_to_go = 1;
 
        return 0;
index 4ffd1ab..eb757f0 100644 (file)
@@ -132,7 +132,7 @@ int main(int argc, char **argv)
                                printf(_("Could not load CD-ROM!\n"));
                                return -1;
                        }
-                       emu_on_new_cd();
+                       emu_on_new_cd(0);
                        ready_to_go = 1;
                }
        }