From: notaz Date: Sat, 10 Nov 2012 20:23:37 +0000 (+0200) Subject: frontend: avoid loading msg when not needed X-Git-Tag: r16~1 X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?p=pcsx_rearmed.git;a=commitdiff_plain;h=79f216e32563acc81517729fe56a6f11f110b0a4 frontend: avoid loading msg when not needed --- diff --git a/frontend/libretro.c b/frontend/libretro.c index 11bcef4f..82e6f658 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 c1ceb574..48031989 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 44c1b6a5..7e5dc47f 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 333bdb6c..a984bbf0 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; diff --git a/maemo/main.c b/maemo/main.c index 4ffd1ab7..eb757f0b 100644 --- a/maemo/main.c +++ b/maemo/main.c @@ -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; } }