From b23ffd5176c26de5d74569f4c10c53b4fdcb100b Mon Sep 17 00:00:00 2001 From: Miodrag Milanovic Date: Fri, 9 May 2014 07:42:15 +0000 Subject: [PATCH] fix Error in command line not being visible due to buffering, also cleaned some other (nw) --- src/emu/clifront.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/emu/clifront.c b/src/emu/clifront.c index 50e01e58ebd..199306ccaf4 100644 --- a/src/emu/clifront.c +++ b/src/emu/clifront.c @@ -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; }