mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2025-03-06 14:27:43 +00:00
Attach to parent process when calling --help on Windows.
This commit is contained in:
parent
7c48887ab3
commit
bcc099d8ba
|
@ -73,6 +73,14 @@ bool parseArgs(int argc, char* argv[], unsigned int* width, unsigned int* height
|
||||||
scrape_cmdline = true;
|
scrape_cmdline = true;
|
||||||
}else if(strcmp(argv[i], "--help") == 0 || strcmp(argv[i], "-h") == 0)
|
}else if(strcmp(argv[i], "--help") == 0 || strcmp(argv[i], "-h") == 0)
|
||||||
{
|
{
|
||||||
|
#ifdef WIN32
|
||||||
|
// This is a bit of a hack, but otherwise output will go to nowhere
|
||||||
|
// when the application is compiled with the "WINDOWS" subsystem (which we usually are).
|
||||||
|
// If you're an experienced Windows programmer and know how to do this
|
||||||
|
// the right way, please submit a pull request!
|
||||||
|
AttachConsole(ATTACH_PARENT_PROCESS);
|
||||||
|
freopen("CONOUT$", "wb", stdout);
|
||||||
|
#endif
|
||||||
std::cout <<
|
std::cout <<
|
||||||
"EmulationStation, a graphical front-end for ROM browsing.\n"
|
"EmulationStation, a graphical front-end for ROM browsing.\n"
|
||||||
"Written by Alec \"Aloshi\" Lofquist.\n"
|
"Written by Alec \"Aloshi\" Lofquist.\n"
|
||||||
|
|
Loading…
Reference in a new issue