mirror of
https://github.com/holub/mame
synced 2025-10-05 16:50:57 +03:00
fix Error in command line not being visible due to buffering, also cleaned some other (nw)
This commit is contained in:
parent
86d85b8cdd
commit
b23ffd5176
@ -215,7 +215,7 @@ int cli_frontend::execute(int argc, char **argv)
|
||||
throw emu_fatalerror(MAMERR_INVALID_CONFIG, "%s", option_errors.trimspace().cstr());
|
||||
}
|
||||
if (option_errors)
|
||||
printf("Error in command line:\n%s\n", option_errors.trimspace().cstr());
|
||||
osd_printf_error("Error in command line:\n%s\n", option_errors.trimspace().cstr());
|
||||
|
||||
// determine the base name of the EXE
|
||||
astring exename;
|
||||
@ -242,7 +242,7 @@ int cli_frontend::execute(int argc, char **argv)
|
||||
catch (emu_fatalerror &fatal)
|
||||
{
|
||||
astring string(fatal.string());
|
||||
fprintf(stderr, "%s\n", string.trimspace().cstr());
|
||||
osd_printf_error("%s\n", string.trimspace().cstr());
|
||||
m_result = (fatal.exitcode() != 0) ? fatal.exitcode() : MAMERR_FATALERROR;
|
||||
|
||||
// if a game was specified, wasn't a wildcard, and our error indicates this was the
|
||||
@ -255,26 +255,26 @@ int cli_frontend::execute(int argc, char **argv)
|
||||
drivlist.find_approximate_matches(m_options.system_name(), ARRAY_LENGTH(matches), matches);
|
||||
|
||||
// print them out
|
||||
fprintf(stderr, "\n\"%s\" approximately matches the following\n"
|
||||
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());
|
||||
for (int matchnum = 0; matchnum < ARRAY_LENGTH(matches); matchnum++)
|
||||
if (matches[matchnum] != -1)
|
||||
fprintf(stderr, "%-18s%s\n", drivlist.driver(matches[matchnum]).name, drivlist.driver(matches[matchnum]).description);
|
||||
osd_printf_error("%-18s%s\n", drivlist.driver(matches[matchnum]).name, drivlist.driver(matches[matchnum]).description);
|
||||
}
|
||||
}
|
||||
catch (emu_exception &)
|
||||
{
|
||||
fprintf(stderr, "Caught unhandled emulator exception\n");
|
||||
osd_printf_error("Caught unhandled emulator exception\n");
|
||||
m_result = MAMERR_FATALERROR;
|
||||
}
|
||||
catch (std::bad_alloc &)
|
||||
{
|
||||
fprintf(stderr, "Out of memory!\n");
|
||||
osd_printf_error("Out of memory!\n");
|
||||
m_result = MAMERR_FATALERROR;
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
fprintf(stderr, "Caught unhandled exception\n");
|
||||
osd_printf_error("Caught unhandled exception\n");
|
||||
m_result = MAMERR_FATALERROR;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user