File:  [Previous NeXT emulator] / previous / src / gui-win / opencon.c
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Tue Apr 24 19:25:10 2018 UTC (8 years, 3 months ago) by root
Branches: giles, MAIN
CVS tags: branch_winuae-cpu, branch_softfloat, branch_scsi, branch_realtime, branch_mmu, branch_keyboard, branch_gilles, branch1, HEAD
Previous NeXT emulator

/*
  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.

  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.
  So we simply open a new console when the debug mode has been enabled, and we redirect
  the stdio again - this time to our new console.
*/

#include <windows.h>
#include <stdbool.h>
#include <stdio.h>
#include <SDL_types.h>

#include "opencon.h"
#include "../debug/debugui.h"


void Win_OpenCon(void)
{
	if (!bExceptionDebugging)
		return;

	AllocConsole();
	freopen("CON", "w", stdout);
	freopen("CON", "r", stdin);
	freopen("CON", "wr", stderr);
}

unix.superglobalmegacorp.com

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