view terminal_win.c @ 816:7ed55a361e79

Use binary mode for reading shaders and config files so we actually get the number of bytes we expect
author Michael Pavone <pavone@retrodev.com>
date Mon, 27 Jul 2015 23:49:14 -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);
	}
}