From 4dcb3f74423dc4c8cb600e026bec741439ee23e9 Mon Sep 17 00:00:00 2001 From: Sam Hocevar Date: Fri, 23 Jan 2004 09:15:42 +0000 Subject: [PATCH] * src/caca.c: + Alloc the AllocConsole() call to fail in case the process already has a console. --- src/caca.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/caca.c b/src/caca.c index 50bf9f0..7a71972 100644 --- a/src/caca.c +++ b/src/caca.c @@ -172,8 +172,8 @@ int caca_init(void) #if defined(USE_WIN32) if(_caca_driver == CACA_DRIVER_WIN32) { - if(!AllocConsole()) - return -1; + /* This call is allowed to fail in cas we already have a console */ + AllocConsole(); win32_hin = GetStdHandle(STD_INPUT_HANDLE); win32_hout = CreateFile("CONOUT$", GENERIC_READ | GENERIC_WRITE,