view terminal_win.c @ 823:b1b5a7e7d955

Detect invalid destination modes for immediate variant opcodes. This fixes a crash bug in Bill's Tomato Game on Windows
author Michael Pavone <pavone@retrodev.com>
date Mon, 03 Aug 2015 22:30:29 -0700
parents 1af7d1cdcc66
children 0433fdd9ba66
line wrap: on
line source

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

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