added missing files

This commit is contained in:
fourtf 2021-03-13 12:40:43 +01:00
parent 81ce8dcc08
commit a8c7e4a826
2 changed files with 25 additions and 0 deletions

View file

@ -0,0 +1,20 @@
#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

View file

@ -0,0 +1,5 @@
#pragma once
namespace chatterino {
void attachToConsole();
}