From e49ee14ed0038758dff70486b159da2c3aac53a5 Mon Sep 17 00:00:00 2001 From: Filip Gawin Date: Sun, 3 Jan 2021 00:38:51 +0100 Subject: [PATCH] Add option to redirect output to file --- src/core/config.h | 1 + src/skel/glfw/glfw.cpp | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/src/core/config.h b/src/core/config.h index 9f4ccd1f..fcfe980f 100644 --- a/src/core/config.h +++ b/src/core/config.h @@ -235,6 +235,7 @@ enum Config { #ifdef DEBUGMENU #define MISSION_SWITCHER // from debug menu #endif +//#define LOG_TO_FILE // Rendering/display //#define EXTRA_MODEL_FLAGS // from mobile to optimize rendering diff --git a/src/skel/glfw/glfw.cpp b/src/skel/glfw/glfw.cpp index 93bfde5a..dcd2b23f 100644 --- a/src/skel/glfw/glfw.cpp +++ b/src/skel/glfw/glfw.cpp @@ -1488,6 +1488,10 @@ WinMain(HINSTANCE instance, int main(int argc, char *argv[]) { +#ifdef LOG_TO_FILE + freopen("re3_log.txt", "w", stdout); + freopen("re3_errors.txt", "w", stderr); +#endif #endif RwV2d pos; RwInt32 i;