1
0
Fork 0
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:
withmorten 2020-11-28 17:57:10 +01:00 committed by Sergeanur
parent 8cb3c07151
commit b8d3d8f5e4
2 changed files with 17 additions and 11 deletions

View file

@ -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

View file

@ -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.