File:  [HATARI the Atari ST Emulator] / hatari / src / gui-win / opencon.c
Revision 1.1.1.4 (vendor branch): download - view: text, annotated - select for diffs
Tue Apr 9 08:53:35 2019 UTC (7 years, 1 month ago) by root
Branches: hatari, MAIN
CVS tags: hatari02210, hatari02200, hatari02100, hatari02000, hatari01900, hatari01800, hatari01700, HEAD
hatari 1.7.0

/*
  Hatari - opencon.c

  This file is distributed under the GNU General 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 "opencon.h"
#include "../includes/configuration.h"


void Win_OpenCon(void)
{
	if (ConfigureParams.Log.bConsoleWindow)
	{
		AllocConsole();
		freopen("CON", "w", stdout);
		freopen("CON", "r", stdin);
		freopen("CON", "w", stderr);
	}
}

unix.superglobalmegacorp.com

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