From 540307cdf6bcfa43bc85725fc107b88616f5454e Mon Sep 17 00:00:00 2001 From: Nathan Woods Date: Mon, 27 Feb 2017 18:39:38 -0500 Subject: Fixed -readconfig regression introduced in the 0.184 dev cycle --- src/frontend/mame/clifront.cpp | 20 ++++++++------------ src/frontend/mame/clifront.h | 2 +- 2 files changed, 9 insertions(+), 13 deletions(-) diff --git a/src/frontend/mame/clifront.cpp b/src/frontend/mame/clifront.cpp index 9f281c46296..e825976cca0 100644 --- a/src/frontend/mame/clifront.cpp +++ b/src/frontend/mame/clifront.cpp @@ -194,8 +194,10 @@ cli_frontend::~cli_frontend() mame_options::remove_device_options(m_options); } -void cli_frontend::start_execution(mame_machine_manager *manager, std::vector &args, std::string &option_errors) +void cli_frontend::start_execution(mame_machine_manager *manager, std::vector &args) { + std::string option_errors; + // parse the command line, adding any system-specific options if (!mame_options::parse_command_line(m_options, args, option_errors)) { @@ -219,6 +221,10 @@ void cli_frontend::start_execution(mame_machine_manager *manager, std::vectorstart_context(); - // We need to preprocess the config files once to determine the web server's configuration - // and file locations - if (m_options.read_config()) - { - m_options.revert(OPTION_PRIORITY_INI); - mame_options::parse_standard_inis(m_options, option_errors); - } if (!option_errors.empty()) osd_printf_error("Error in command line:\n%s\n", strtrimspace(option_errors).c_str()); @@ -260,10 +259,7 @@ int cli_frontend::execute(std::vector &args) try { - std::string option_errors; - mame_options::parse_standard_inis(m_options, option_errors); - - start_execution(manager, args, option_errors); + start_execution(manager, args); } // handle exceptions of various types catch (emu_fatalerror &fatal) diff --git a/src/frontend/mame/clifront.h b/src/frontend/mame/clifront.h index 7c3f2e4519e..7366243d2e4 100644 --- a/src/frontend/mame/clifront.h +++ b/src/frontend/mame/clifront.h @@ -59,7 +59,7 @@ private: void display_help(const char *exename); void display_suggestions(const char *gamename); void output_single_softlist(FILE *out, software_list_device &swlist); - void start_execution(mame_machine_manager *manager, std::vector &args, std::string &option_errors); + void start_execution(mame_machine_manager *manager, std::vector &args); // internal state emu_options & m_options; -- cgit v1.2.3