Annotation of previous_trunk/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 <stdbool.h>
        !            15: #include <stdio.h>
        !            16: #include <SDL_types.h>
        !            17: 
        !            18: #include "opencon.h"
        !            19: #include "../debug/debugui.h"
        !            20: 
        !            21: 
        !            22: void Win_OpenCon(void)
        !            23: {
        !            24:        if (!bExceptionDebugging)
        !            25:                return;
        !            26: 
        !            27:        AllocConsole();
        !            28:        freopen("CON", "w", stdout);
        !            29:        freopen("CON", "r", stdin);
        !            30:        freopen("CON", "wr", stderr);
        !            31: }

unix.superglobalmegacorp.com

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