summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/clifront.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/emu/clifront.cpp')
-rw-r--r--src/emu/clifront.cpp21
1 files changed, 14 insertions, 7 deletions
diff --git a/src/emu/clifront.cpp b/src/emu/clifront.cpp
index a016d13a031..6b75841df83 100644
--- a/src/emu/clifront.cpp
+++ b/src/emu/clifront.cpp
@@ -89,7 +89,6 @@ cli_frontend::~cli_frontend()
m_options.remove_device_options();
}
-
//-------------------------------------------------
// execute - execute a game via the standard
// command line interface
@@ -99,6 +98,8 @@ int cli_frontend::execute(int argc, char **argv)
{
// wrap the core execution in a try/catch to field all fatal errors
m_result = MAMERR_NONE;
+ machine_manager *manager = machine_manager::instance(m_options, m_osd);
+
try
{
// first parse options to be able to get software from it
@@ -106,6 +107,11 @@ int cli_frontend::execute(int argc, char **argv)
m_options.parse_command_line(argc, argv, option_errors);
m_options.parse_standard_inis(option_errors);
+
+ //load_translation();
+ load_translation(m_options);
+
+ manager->start_luaengine();
if (*(m_options.software_name()) != 0)
{
@@ -211,9 +217,7 @@ int cli_frontend::execute(int argc, char **argv)
throw emu_fatalerror(MAMERR_NO_SUCH_GAME, "Unknown system '%s'", m_options.system_name());
// otherwise just run the game
- machine_manager *manager = machine_manager::instance(m_options, m_osd);
m_result = manager->execute();
- global_free(manager);
}
}
@@ -236,7 +240,7 @@ int cli_frontend::execute(int argc, char **argv)
// print them out
osd_printf_error("\n\"%s\" approximately matches the following\n"
- "supported %s (best match first):\n\n", m_options.system_name(),emulator_info::get_gamesnoun());
+ "supported machines (best match first):\n\n", m_options.system_name());
for (auto & matche : matches)
if (matche != -1)
osd_printf_error("%-18s%s\n", drivlist.driver(matche).name, drivlist.driver(matche).description);
@@ -264,6 +268,7 @@ int cli_frontend::execute(int argc, char **argv)
}
_7z_file_cache_clear();
+ global_free(manager);
return m_result;
}
@@ -1588,7 +1593,7 @@ void cli_frontend::execute_commands(const char *exename)
// showusage?
if (strcmp(m_options.command(), CLICOMMAND_SHOWUSAGE) == 0)
{
- emulator_info::printf_usage(exename, emulator_info::get_gamenoun());
+ osd_printf_info("Usage: %s [machine] [media] [software] [options]",exename);
osd_printf_info("\n\nOptions:\n%s", m_options.output_help().c_str());
return;
}
@@ -1690,8 +1695,10 @@ void cli_frontend::execute_commands(const char *exename)
void cli_frontend::display_help()
{
osd_printf_info("%s v%s\n%s\n\n", emulator_info::get_appname(),build_version,emulator_info::get_copyright_info());
- osd_printf_info("%s\n", emulator_info::get_disclaimer());
- emulator_info::printf_usage(emulator_info::get_appname(),emulator_info::get_gamenoun());
+ osd_printf_info("This software reproduces, more or less faithfully, the behaviour of a wide range\n"
+ "of machines. But hardware is useless without software, so images of the ROMs and\n"
+ "other media which run on that hardware are also required.\n\n");
+ osd_printf_info("Usage: %s [machine] [media] [software] [options]",emulator_info::get_appname());
osd_printf_info("\n\n"
" %s -showusage for a brief list of options\n"
" %s -showconfig for a list of configuration options\n"