view terminal_win.c @ 2534:35dbe1873c8f

Speed up pasting and do some prep for pasting characters that need keys pressed in sequence
author Michael Pavone <pavone@retrodev.com>
date Wed, 27 Nov 2024 16:43:56 -0800
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;
	}
}