Make display_help() use exename to print MAME's program name.

Rework commit 658a4b1 to use exename instead of appname.
This commit is contained in:
Jordi Mallach 2016-04-16 00:33:34 +02:00
parent 658a4b1862
commit aae47ddb1c
2 changed files with 6 additions and 6 deletions

View File

@ -1586,7 +1586,7 @@ void cli_frontend::execute_commands(const char *exename)
// help? // help?
if (strcmp(m_options.command(), CLICOMMAND_HELP) == 0) if (strcmp(m_options.command(), CLICOMMAND_HELP) == 0)
{ {
display_help(); display_help(exename);
return; return;
} }
@ -1707,20 +1707,20 @@ void cli_frontend::execute_commands(const char *exename)
// output // output
//------------------------------------------------- //-------------------------------------------------
void cli_frontend::display_help() void cli_frontend::display_help(const char *exename)
{ {
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 v%s\n%s\n\n", emulator_info::get_appname(),build_version,emulator_info::get_copyright_info());
osd_printf_info("This software reproduces, more or less faithfully, the behaviour of a wide range\n" 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" "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"); "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_lower()); osd_printf_info("Usage: %s [machine] [media] [software] [options]",exename);
osd_printf_info("\n\n" osd_printf_info("\n\n"
" %s -showusage for a brief list of options\n" " %s -showusage for a brief list of options\n"
" %s -showconfig for a list of configuration options\n" " %s -showconfig for a list of configuration options\n"
" %s -listmedia for a full list of supported media\n" " %s -listmedia for a full list of supported media\n"
" %s -createconfig to create a %s.ini\n\n" " %s -createconfig to create a %s.ini\n\n"
"For usage instructions, please consult the files config.txt and windows.txt.\n",emulator_info::get_appname_lower(), "For usage instructions, please consult the files config.txt and windows.txt.\n",exename,
emulator_info::get_appname_lower(),emulator_info::get_appname_lower(),emulator_info::get_appname_lower(),emulator_info::get_configname()); exename,exename,exename,emulator_info::get_configname());
} }

View File

@ -59,7 +59,7 @@ public:
private: private:
// internal helpers // internal helpers
void execute_commands(const char *exename); void execute_commands(const char *exename);
void display_help(); 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);