|
|
1.1 root 1: /*
2: Hatari - opencon.c
3:
4: This file is distributed under the GNU Public License, version 2 or at
5: your option any later version. Read the file gpl.txt for details.
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>
1.1.1.2 ! root 16: #include <SDL_types.h>
1.1 root 17:
18: #include "opencon.h"
1.1.1.2 ! root 19: #include "debugui.h"
1.1 root 20:
21:
22: void Win_OpenCon(void)
23: {
1.1.1.2 ! root 24: if (!bExceptionDebugging)
1.1 root 25: return;
26:
27: AllocConsole();
28: freopen("CON", "w", stdout);
29: freopen("CON", "r", stdin);
30: freopen("CON", "wr", stderr);
31: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.