summaryrefslogtreecommitdiffstats
path: root/src
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
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')
-rw-r--r--src/skel/glfw/glfw.cpp14
-rw-r--r--src/skel/win/win.cpp18
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
/*