view terminal_win.c @ 1325:58bfbed6cdb5

Fairly major rework of how active/passive is handled along with how the V30 mode bit is handled. Allows the vertical border extension trick in Overdrive 2 to work right
author Michael Pavone <pavone@retrodev.com>
date Fri, 21 Apr 2017 01:22:52 -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;
	}
}