Annotation of hatari/src/gui-win/opencon.c, revision 1.1

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>
        !            14: #include <stdio.h>
        !            15: 
        !            16: #include "opencon.h"
        !            17: 
        !            18: extern int bEnableDebug;
        !            19: 
        !            20: void Win_OpenCon(void)
        !            21: {
        !            22:        if (!bEnableDebug)
        !            23:                return;
        !            24: 
        !            25:        AllocConsole();
        !            26:        freopen("CON", "w", stdout);
        !            27:        freopen("CON", "r", stdin);
        !            28:        freopen("CON", "wr", stderr);
        !            29: }

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.