mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-13 19:49:51 +01:00
21 lines
325 B
C++
21 lines
325 B
C++
|
#include "AttachToConsole.hpp"
|
||
|
|
||
|
#ifdef USEWINSDK
|
||
|
# include <Windows.h>
|
||
|
#endif
|
||
|
|
||
|
namespace chatterino {
|
||
|
|
||
|
void attachToConsole()
|
||
|
{
|
||
|
#ifdef USEWINSDK
|
||
|
if (AttachConsole(ATTACH_PARENT_PROCESS))
|
||
|
{
|
||
|
freopen("CONOUT$", "w", stdout);
|
||
|
freopen("CONOUT$", "w", stderr);
|
||
|
}
|
||
|
#endif
|
||
|
}
|
||
|
|
||
|
} // namespace chatterino
|