mirror of
https://github.com/holub/mame
synced 2025-05-24 14:56:21 +03:00
Revert back change r11240 of clifront.c since errors caused for romident and similar commands (no whatsnew)
This commit is contained in:
parent
ce5cc6e76f
commit
a3eb622950
@ -127,20 +127,30 @@ int cli_execute(int argc, char **argv, osd_interface &osd, const options_entry *
|
|||||||
/* initialize the options manager and add the CLI-specific options */
|
/* initialize the options manager and add the CLI-specific options */
|
||||||
options = mame_options_init(osd_options);
|
options = mame_options_init(osd_options);
|
||||||
options_add_entries(options, cli_options);
|
options_add_entries(options, cli_options);
|
||||||
|
|
||||||
gamename_option = "";
|
/* parse the command line first; if we fail here, we're screwed */
|
||||||
for (int arg = 1; arg < argc; arg++)
|
if (options_parse_command_line(options, argc, argv, OPTION_PRIORITY_CMDLINE))
|
||||||
{
|
{
|
||||||
if ((argv[arg][0] != '-')) {
|
result = MAMERR_INVALID_CONFIG;
|
||||||
gamename_option = argv[arg];
|
goto error;
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* parse the simple commmands before we go any further */
|
||||||
|
core_filename_extract_base(&exename, argv[0], TRUE);
|
||||||
|
result = execute_simple_commands(options, exename);
|
||||||
|
if (result != -1)
|
||||||
|
goto error;
|
||||||
|
|
||||||
/* find out what game we might be referring to */
|
/* find out what game we might be referring to */
|
||||||
|
gamename_option = options_get_string(options, OPTION_GAMENAME);
|
||||||
core_filename_extract_base(&gamename, gamename_option, TRUE);
|
core_filename_extract_base(&gamename, gamename_option, TRUE);
|
||||||
driver = driver_get_name(gamename);
|
driver = driver_get_name(gamename);
|
||||||
|
|
||||||
|
/* execute any commands specified */
|
||||||
|
result = execute_commands(options, exename, driver);
|
||||||
|
if (result != -1)
|
||||||
|
goto error;
|
||||||
|
|
||||||
/* if we don't have a valid driver selected, offer some suggestions */
|
/* if we don't have a valid driver selected, offer some suggestions */
|
||||||
if (strlen(gamename_option) > 0 && driver == NULL)
|
if (strlen(gamename_option) > 0 && driver == NULL)
|
||||||
{
|
{
|
||||||
@ -162,24 +172,6 @@ int cli_execute(int argc, char **argv, osd_interface &osd, const options_entry *
|
|||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* parse the command line first; if we fail here, we're screwed */
|
|
||||||
if (options_parse_command_line(options, argc, argv, OPTION_PRIORITY_CMDLINE))
|
|
||||||
{
|
|
||||||
result = MAMERR_INVALID_CONFIG;
|
|
||||||
goto error;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* parse the simple commmands before we go any further */
|
|
||||||
core_filename_extract_base(&exename, argv[0], TRUE);
|
|
||||||
result = execute_simple_commands(options, exename);
|
|
||||||
if (result != -1)
|
|
||||||
goto error;
|
|
||||||
|
|
||||||
/* execute any commands specified */
|
|
||||||
result = execute_commands(options, exename, driver);
|
|
||||||
if (result != -1)
|
|
||||||
goto error;
|
|
||||||
|
|
||||||
/* run the game */
|
/* run the game */
|
||||||
result = mame_execute(osd, options);
|
result = mame_execute(osd, options);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user