win32: redirect stderr to console in addition to stdout

This commit is contained in:
zeromus 2009-05-29 06:15:29 +00:00
parent d8d3cd7dc0
commit 29ac31a5a4
1 changed files with 3 additions and 1 deletions

View File

@ -1,8 +1,8 @@
/* Copyright (C) 2006 yopyop
yopyop156@ifrance.com
yopyop156.ifrance.com
Copyright 2008 CrazyMax (mtabachenko)
Copyright (C) 2009 DeSmuME team
This file is part of DeSmuME
@ -65,6 +65,8 @@ void OpenConsole()
int hConHandle = _open_osfhandle(lStdHandle, _O_TEXT);
FILE *fp = _fdopen( hConHandle, "w" );
*stdout = *fp;
//and stderr
*stderr = *fp;
}
void CloseConsole() {