mirror of
https://git.rip/DMCA_FUCKER/re3.git
synced 2024-12-23 07:40:01 +00:00
add -console cmdline arg instead of #if 0/1
# Conflicts: # src/skel/glfw/glfw.cpp # src/skel/win/win.cpp
This commit is contained in:
parent
8cb3c07151
commit
b8d3d8f5e4
|
@ -1479,12 +1479,14 @@ WinMain(HINSTANCE instance,
|
||||||
RwChar** argv;
|
RwChar** argv;
|
||||||
SystemParametersInfo(SPI_SETFOREGROUNDLOCKTIMEOUT, 0, nil, SPIF_SENDCHANGE);
|
SystemParametersInfo(SPI_SETFOREGROUNDLOCKTIMEOUT, 0, nil, SPIF_SENDCHANGE);
|
||||||
|
|
||||||
#if 1
|
#ifndef MASTER
|
||||||
// TODO: make this an option somewhere
|
if (strstr(cmdLine, "-console"))
|
||||||
AllocConsole();
|
{
|
||||||
freopen("CONIN$", "r", stdin);
|
AllocConsole();
|
||||||
freopen("CONOUT$", "w", stdout);
|
freopen("CONIN$", "r", stdin);
|
||||||
freopen("CONOUT$", "w", stderr);
|
freopen("CONOUT$", "w", stdout);
|
||||||
|
freopen("CONOUT$", "w", stderr);
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
|
@ -2005,11 +2005,15 @@ WinMain(HINSTANCE instance,
|
||||||
RwChar **argv;
|
RwChar **argv;
|
||||||
SystemParametersInfo(SPI_SETFOREGROUNDLOCKTIMEOUT, 0, nil, SPIF_SENDCHANGE);
|
SystemParametersInfo(SPI_SETFOREGROUNDLOCKTIMEOUT, 0, nil, SPIF_SENDCHANGE);
|
||||||
|
|
||||||
// TODO: make this an option somewhere
|
#ifndef MASTER
|
||||||
AllocConsole();
|
if (strstr(cmdLine, "-console"))
|
||||||
freopen("CONIN$", "r", stdin);
|
{
|
||||||
freopen("CONOUT$", "w", stdout);
|
AllocConsole();
|
||||||
freopen("CONOUT$", "w", stderr);
|
freopen("CONIN$", "r", stdin);
|
||||||
|
freopen("CONOUT$", "w", stdout);
|
||||||
|
freopen("CONOUT$", "w", stderr);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Initialize the platform independent data.
|
* Initialize the platform independent data.
|
||||||
|
|
Loading…
Reference in a new issue