view terminal_win.c @ 1279:996eb76d6da1

RESET is not a terminal instruction on the 68K. Fixes a crash bug in Chavez II and possibly other games
author Michael Pavone <pavone@retrodev.com>
date Mon, 13 Mar 2017 23:14:13 -0700
parents 0433fdd9ba66
children
line wrap: on
line source

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

static char init_done;

void force_no_terminal()
{
	init_done = 1;
}

void init_terminal()
{
	if (!init_done) {
		AllocConsole();
		freopen("CONIN$", "r", stdin);
		freopen("CONOUT$", "w", stdout);
		freopen("CONOUT$", "w", stderr);
		init_done = 1;
	}
}