diff options
author | notaz | 2012-11-10 22:23:37 +0200 |
---|---|---|
committer | notaz | 2012-11-10 22:23:37 +0200 |
commit | 79f216e32563acc81517729fe56a6f11f110b0a4 (patch) | |
tree | 07c74eccae1012cde3102d48c43820910bd3bfb4 /frontend | |
parent | a29f182fb4cf03fb74ec809746cee757f6d47715 (diff) | |
download | pcsx_rearmed-79f216e32563acc81517729fe56a6f11f110b0a4.tar.gz pcsx_rearmed-79f216e32563acc81517729fe56a6f11f110b0a4.tar.bz2 pcsx_rearmed-79f216e32563acc81517729fe56a6f11f110b0a4.zip |
frontend: avoid loading msg when not needed
Diffstat (limited to 'frontend')
-rw-r--r-- | frontend/libretro.c | 2 | ||||
-rw-r--r-- | frontend/main.c | 10 | ||||
-rw-r--r-- | frontend/main.h | 2 | ||||
-rw-r--r-- | frontend/menu.c | 2 |
4 files changed, 9 insertions, 7 deletions
diff --git a/frontend/libretro.c b/frontend/libretro.c index 11bcef4..82e6f65 100644 --- a/frontend/libretro.c +++ b/frontend/libretro.c @@ -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; } diff --git a/frontend/main.c b/frontend/main.c index c1ceb57..4803198 100644 --- a/frontend/main.c +++ b/frontend/main.c @@ -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; } } diff --git a/frontend/main.h b/frontend/main.h index 44c1b6a..7e5dc47 100644 --- a/frontend/main.h +++ b/frontend/main.h @@ -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); diff --git a/frontend/menu.c b/frontend/menu.c index 333bdb6..a984bbf 100644 --- a/frontend/menu.c +++ b/frontend/menu.c @@ -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; |