mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-03-24 04:43:49 +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
@ -73,16 +73,19 @@ namespace Debug
|
|||||||
{
|
{
|
||||||
_wfreopen(L"CON", L"r", stdin);
|
_wfreopen(L"CON", L"r", stdin);
|
||||||
freopen("CON", "r", stdin);
|
freopen("CON", "r", stdin);
|
||||||
|
std::cin.clear();
|
||||||
}
|
}
|
||||||
if (!outRedirected)
|
if (!outRedirected)
|
||||||
{
|
{
|
||||||
_wfreopen(L"CON", L"w", stdout);
|
_wfreopen(L"CON", L"w", stdout);
|
||||||
freopen("CON", "w", stdout);
|
freopen("CON", "w", stdout);
|
||||||
|
std::cout.clear();
|
||||||
}
|
}
|
||||||
if (!errRedirected)
|
if (!errRedirected)
|
||||||
{
|
{
|
||||||
_wfreopen(L"CON", L"w", stderr);
|
_wfreopen(L"CON", L"w", stderr);
|
||||||
freopen("CON", "w", stderr);
|
freopen("CON", "w", stderr);
|
||||||
|
std::cerr.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user