diff options
author | erorcun <erayorcunus@gmail.com> | 2020-12-01 02:21:00 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-01 02:21:00 +0100 |
commit | 4ec60676e7c7d63da60648567a6fd933e225487a (patch) | |
tree | 946517effae2e6704c797b64cf59ae9189c0d7a1 | |
parent | some more GTA_VERSION (diff) | |
parent | add -console cmdline arg instead of #if 0/1 (diff) | |
download | re3-4ec60676e7c7d63da60648567a6fd933e225487a.tar re3-4ec60676e7c7d63da60648567a6fd933e225487a.tar.gz re3-4ec60676e7c7d63da60648567a6fd933e225487a.tar.bz2 re3-4ec60676e7c7d63da60648567a6fd933e225487a.tar.lz re3-4ec60676e7c7d63da60648567a6fd933e225487a.tar.xz re3-4ec60676e7c7d63da60648567a6fd933e225487a.tar.zst re3-4ec60676e7c7d63da60648567a6fd933e225487a.zip |
-rw-r--r-- | src/skel/glfw/glfw.cpp | 14 | ||||
-rw-r--r-- | src/skel/win/win.cpp | 18 |
2 files changed, 18 insertions, 14 deletions
diff --git a/src/skel/glfw/glfw.cpp b/src/skel/glfw/glfw.cpp index cad84b8a..7354c90a 100644 --- a/src/skel/glfw/glfw.cpp +++ b/src/skel/glfw/glfw.cpp @@ -1453,12 +1453,14 @@ WinMain(HINSTANCE instance, RwChar** argv; SystemParametersInfo(SPI_SETFOREGROUNDLOCKTIMEOUT, 0, nil, SPIF_SENDCHANGE); -#if 0 - // TODO: make this an option somewhere - AllocConsole(); - freopen("CONIN$", "r", stdin); - freopen("CONOUT$", "w", stdout); - freopen("CONOUT$", "w", stderr); +#ifndef MASTER + if (strstr(cmdLine, "-console")) + { + AllocConsole(); + freopen("CONIN$", "r", stdin); + freopen("CONOUT$", "w", stdout); + freopen("CONOUT$", "w", stderr); + } #endif #else diff --git a/src/skel/win/win.cpp b/src/skel/win/win.cpp index 6d0c2d67..c16ea2a1 100644 --- a/src/skel/win/win.cpp +++ b/src/skel/win/win.cpp @@ -2011,16 +2011,18 @@ WinMain(HINSTANCE instance, RwChar **argv; SystemParametersInfo(SPI_SETFOREGROUNDLOCKTIMEOUT, 0, nil, SPIF_SENDCHANGE); -#ifdef USE_CUSTOM_ALLOCATOR - InitMemoryMgr(); +#ifndef MASTER + if (strstr(cmdLine, "-console")) + { + AllocConsole(); + freopen("CONIN$", "r", stdin); + freopen("CONOUT$", "w", stdout); + freopen("CONOUT$", "w", stderr); + } #endif -#if 1 - // TODO: make this an option somewhere - AllocConsole(); - freopen("CONIN$", "r", stdin); - freopen("CONOUT$", "w", stdout); - freopen("CONOUT$", "w", stderr); +#ifdef USE_CUSTOM_ALLOCATOR + InitMemoryMgr(); #endif /* |