view terminal_win.c @ 825:e6f2c9dbf6c8

Prevent crashes if game tries to access the ROM area outside of the size of the actual ROM
author Michael Pavone <pavone@retrodev.com>
date Tue, 04 Aug 2015 21:43:20 -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);
	}
}