--- hatari/src/gui-win/opencon.c 2019/04/01 07:13:54 1.1.1.1 +++ hatari/src/gui-win/opencon.c 2019/04/09 08:53:35 1.1.1.4 @@ -1,8 +1,8 @@ /* Hatari - opencon.c - This file is distributed under the GNU Public License, version 2 or at - your option any later version. Read the file gpl.txt for details. + This file is distributed under the GNU General Public License, version 2 + or at your option any later version. Read the file gpl.txt for details. The SDL library redirects the stdio normally to the files stdout.txt and stderr.txt. But with this redirection, the debugger of Hatari does not work anymore. @@ -11,19 +11,20 @@ */ #include +#include #include #include "opencon.h" +#include "../includes/configuration.h" -extern int bEnableDebug; void Win_OpenCon(void) { - if (!bEnableDebug) - return; - - AllocConsole(); - freopen("CON", "w", stdout); - freopen("CON", "r", stdin); - freopen("CON", "wr", stderr); + if (ConfigureParams.Log.bConsoleWindow) + { + AllocConsole(); + freopen("CON", "w", stdout); + freopen("CON", "r", stdin); + freopen("CON", "w", stderr); + } }