From b41fa1b5cb2a65ae8d27340cc8e485813ea61a0d Mon Sep 17 00:00:00 2001 From: Sorgelig Date: Thu, 17 Feb 2022 03:16:26 +0800 Subject: [PATCH] Tweaks for waitmount option. --- MiSTer.ini | 5 +++-- user_io.cpp | 12 ++++++------ 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/MiSTer.ini b/MiSTer.ini index 1d7faf2..c9a87c5 100644 --- a/MiSTer.ini +++ b/MiSTer.ini @@ -191,6 +191,7 @@ bt_reset_before_pair=0 ; Wait for specific mount before start the core. ; Attention: waiting is performing BEFORE core start, so no message will be displayed on screen! -; This is debug option. It's useful when core is loaded from USB blaster and games folder is on USB or Network drive. -; This option cannot be used in specific core section as it's parsed before name of core! +; It's useful for debugging when core is loaded from USB blaster and games folder is on USB or Network drive. +; This option cannot be used when defmra in CONFSTR is used (i.e. if arcade rbf is loaded directly not through MRA). +; This option is ignored for Menu core. ;waitmount=/media/usb0 diff --git a/user_io.cpp b/user_io.cpp index 56df96e..20e6727 100644 --- a/user_io.cpp +++ b/user_io.cpp @@ -1103,9 +1103,11 @@ void user_io_init(const char *path, const char *xml) user_io_set_core_name("sharpmz"); } - // parse INI before CONFSTR, no core-specific settings possible at theis time! + user_io_read_confstr(); + user_io_read_core_name(); + cfg_parse(); - while (cfg.waitmount[0]) + while (cfg.waitmount[0] && !is_menu()) { printf("> > > wait for %s mount < < <\n", cfg.waitmount); static char str[256]; @@ -1115,21 +1117,19 @@ void user_io_init(const char *path, const char *xml) sleep(1); } - user_io_read_confstr(); - user_io_read_core_name(); parse_config(); if (!xml && defmra[0] && FileExists(defmra)) { // attn: FC option won't use name from defmra! + // attn: cfg is parsed before defmra, no defmra-name specifics possible in INI! xml = (const char*)defmra; strcpy(core_path, xml); is_arcade_type = 1; arcade_override_name(xml); + user_io_read_core_name(); printf("Using default MRA: %s\n", xml); } - // parse INI again with core-specific settings. - cfg_parse(); if (cfg.log_file_entry) MakeFile("/tmp/STARTPATH", core_path); if (cfg.bootcore[0] != '\0')