mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-21 22:24:07 +01:00
added missing files
This commit is contained in:
parent
81ce8dcc08
commit
a8c7e4a826
2 changed files with 25 additions and 0 deletions
20
src/util/AttachToConsole.cpp
Normal file
20
src/util/AttachToConsole.cpp
Normal 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
|
5
src/util/AttachToConsole.hpp
Normal file
5
src/util/AttachToConsole.hpp
Normal file
|
@ -0,0 +1,5 @@
|
|||
#pragma once
|
||||
|
||||
namespace chatterino {
|
||||
void attachToConsole();
|
||||
}
|
Loading…
Reference in a new issue