mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2024-11-10 21:19:43 +01:00
Add error checks to freopen
calls on Windows
I don't know if they could fail but it's still good to attempt to print _something_ if they do end up failing.
This commit is contained in:
parent
0a181d8c3d
commit
40dd2571c2
1 changed files with 11 additions and 2 deletions
|
@ -181,8 +181,17 @@ void vlog_open_console(void)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
freopen("CON", "w", stdout);
|
const FILE* handle = freopen("CON", "w", stdout);
|
||||||
freopen("CON", "w", stderr);
|
if (handle == NULL)
|
||||||
|
{
|
||||||
|
vlog_error("Could not redirect STDOUT to console.");
|
||||||
|
}
|
||||||
|
|
||||||
|
handle = freopen("CON", "w", stderr);
|
||||||
|
if (handle == NULL)
|
||||||
|
{
|
||||||
|
vlog_error("Could not redirect STDERR to console.");
|
||||||
|
}
|
||||||
|
|
||||||
check_color_support();
|
check_color_support();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue