mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-16 15:29:55 +00:00
Clear std stream errors when reopening
Prior errors are no longer relevant. Shouldn't make a difference unless you've tried printing something before the streams were set up.
This commit is contained in:
parent
901a17ab81
commit
a7021bf9cc
1 changed files with 3 additions and 0 deletions
|
@ -73,16 +73,19 @@ namespace Debug
|
|||
{
|
||||
_wfreopen(L"CON", L"r", stdin);
|
||||
freopen("CON", "r", stdin);
|
||||
std::cin.clear();
|
||||
}
|
||||
if (!outRedirected)
|
||||
{
|
||||
_wfreopen(L"CON", L"w", stdout);
|
||||
freopen("CON", "w", stdout);
|
||||
std::cout.clear();
|
||||
}
|
||||
if (!errRedirected)
|
||||
{
|
||||
_wfreopen(L"CON", L"w", stderr);
|
||||
freopen("CON", "w", stderr);
|
||||
std::cerr.clear();
|
||||
}
|
||||
|
||||
return true;
|
||||
|
|
Loading…
Reference in a new issue