mirror of
https://github.com/GerbilSoft/rom-properties.git
synced 2025-06-18 19:45:41 -04:00
[rpcli] rpcli.cpp: Fix two errors introduced since switching over to vt.cpp.
- DoFile(): JSON errors should be printed to stdout, not stderr. - _tmain(): Remove an extra newline after the `default:` case's "skipping unknown switch" message.
This commit is contained in:
parent
25c5aa02cc
commit
d58918f101
@ -309,7 +309,7 @@ static void DoFile(const TCHAR *filename, bool json, const vector<ExtractParam>
|
|||||||
ConsolePrintNewline(&ci_stderr);
|
ConsolePrintNewline(&ci_stderr);
|
||||||
fflush(stderr);
|
fflush(stderr);
|
||||||
if (json) {
|
if (json) {
|
||||||
ConsolePrint(&ci_stderr, fmt::format(FSTR("{{\"error\":\"couldn't open file\",\"code\":{:d}}}\n"), file->lastError()));
|
ConsolePrint(&ci_stdout, fmt::format(FSTR("{{\"error\":\"couldn't open file\",\"code\":{:d}}}\n"), file->lastError()));
|
||||||
fflush(stdout);
|
fflush(stdout);
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
@ -1031,7 +1031,6 @@ int RP_C_API _tmain(int argc, TCHAR *argv[])
|
|||||||
// FIXME: Unicode character on Windows.
|
// FIXME: Unicode character on Windows.
|
||||||
ConsolePrint(&ci_stderr,
|
ConsolePrint(&ci_stderr,
|
||||||
fmt::format(FRUN(C_("rpcli", "Warning: skipping unknown switch '{:c}'")), (char)argv[i][1]), true);
|
fmt::format(FRUN(C_("rpcli", "Warning: skipping unknown switch '{:c}'")), (char)argv[i][1]), true);
|
||||||
ConsolePrintNewline(&ci_stderr);
|
|
||||||
fflush(stderr);
|
fflush(stderr);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user