mirror of
https://github.com/holub/mame
synced 2025-10-07 01:16:22 +03:00
Fixed -readconfig regression introduced in the 0.184 dev cycle
This commit is contained in:
parent
ebe3b9cfce
commit
540307cdf6
@ -194,8 +194,10 @@ cli_frontend::~cli_frontend()
|
|||||||
mame_options::remove_device_options(m_options);
|
mame_options::remove_device_options(m_options);
|
||||||
}
|
}
|
||||||
|
|
||||||
void cli_frontend::start_execution(mame_machine_manager *manager, std::vector<std::string> &args, std::string &option_errors)
|
void cli_frontend::start_execution(mame_machine_manager *manager, std::vector<std::string> &args)
|
||||||
{
|
{
|
||||||
|
std::string option_errors;
|
||||||
|
|
||||||
// parse the command line, adding any system-specific options
|
// parse the command line, adding any system-specific options
|
||||||
if (!mame_options::parse_command_line(m_options, args, option_errors))
|
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::vector<st
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// read INI's, if appropriate
|
||||||
|
if (m_options.read_config())
|
||||||
|
mame_options::parse_standard_inis(m_options, option_errors);
|
||||||
|
|
||||||
// otherwise, check for a valid system
|
// otherwise, check for a valid system
|
||||||
load_translation(m_options);
|
load_translation(m_options);
|
||||||
|
|
||||||
@ -228,13 +234,6 @@ void cli_frontend::start_execution(mame_machine_manager *manager, std::vector<st
|
|||||||
|
|
||||||
manager->start_context();
|
manager->start_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())
|
if (!option_errors.empty())
|
||||||
osd_printf_error("Error in command line:\n%s\n", strtrimspace(option_errors).c_str());
|
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<std::string> &args)
|
|||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
std::string option_errors;
|
start_execution(manager, args);
|
||||||
mame_options::parse_standard_inis(m_options, option_errors);
|
|
||||||
|
|
||||||
start_execution(manager, args, option_errors);
|
|
||||||
}
|
}
|
||||||
// handle exceptions of various types
|
// handle exceptions of various types
|
||||||
catch (emu_fatalerror &fatal)
|
catch (emu_fatalerror &fatal)
|
||||||
|
@ -59,7 +59,7 @@ private:
|
|||||||
void display_help(const char *exename);
|
void display_help(const char *exename);
|
||||||
void display_suggestions(const char *gamename);
|
void display_suggestions(const char *gamename);
|
||||||
void output_single_softlist(FILE *out, software_list_device &swlist);
|
void output_single_softlist(FILE *out, software_list_device &swlist);
|
||||||
void start_execution(mame_machine_manager *manager, std::vector<std::string> &args, std::string &option_errors);
|
void start_execution(mame_machine_manager *manager, std::vector<std::string> &args);
|
||||||
|
|
||||||
// internal state
|
// internal state
|
||||||
emu_options & m_options;
|
emu_options & m_options;
|
||||||
|
Loading…
Reference in New Issue
Block a user