mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-25 15:45:38 +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;
|
||||
}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 <<
|
||||
"EmulationStation, a graphical front-end for ROM browsing.\n"
|
||||
"Written by Alec \"Aloshi\" Lofquist.\n"
|
||||
|
|
Loading…
Reference in a new issue