summaryrefslogtreecommitdiffstats
path: root/src/skel/glfw
diff options
context:
space:
mode:
authorerorcun <erayorcunus@gmail.com>2020-12-01 02:21:00 +0100
committerGitHub <noreply@github.com>2020-12-01 02:21:00 +0100
commit4ec60676e7c7d63da60648567a6fd933e225487a (patch)
tree946517effae2e6704c797b64cf59ae9189c0d7a1 /src/skel/glfw
parentsome more GTA_VERSION (diff)
parentadd -console cmdline arg instead of #if 0/1 (diff)
downloadre3-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
Diffstat (limited to 'src/skel/glfw')
-rw-r--r--src/skel/glfw/glfw.cpp14
1 files changed, 8 insertions, 6 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