|
|
1.1 root 1: /*
2: Hatari - opencon.c
3:
1.1.1.4 ! root 4: This file is distributed under the GNU General Public License, version 2
! 5: or at your option any later version. Read the file gpl.txt for details.
1.1 root 6:
7: The SDL library redirects the stdio normally to the files stdout.txt and stderr.txt.
8: But with this redirection, the debugger of Hatari does not work anymore.
9: So we simply open a new console when the debug mode has been enabled, and we redirect
10: the stdio again - this time to our new console.
11: */
12:
13: #include <windows.h>
1.1.1.2 root 14: #include <stdbool.h>
1.1 root 15: #include <stdio.h>
16:
17: #include "opencon.h"
1.1.1.4 ! root 18: #include "../includes/configuration.h"
1.1 root 19:
20:
21: void Win_OpenCon(void)
22: {
1.1.1.4 ! root 23: if (ConfigureParams.Log.bConsoleWindow)
! 24: {
! 25: AllocConsole();
! 26: freopen("CON", "w", stdout);
! 27: freopen("CON", "r", stdin);
! 28: freopen("CON", "w", stderr);
! 29: }
1.1 root 30: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.