mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2023-10-10 13:36:59 +02:00
19 lines
496 B
C++
19 lines
496 B
C++
#include <Windows.h>
|
|
|
|
// https://stackoverflow.com/a/57241985
|
|
void CreateConsole()
|
|
{
|
|
if (!AllocConsole()) {
|
|
// Add some error handling here.
|
|
// You can call GetLastError() to get more info about the error.
|
|
return;
|
|
}
|
|
|
|
// std::cout, std::clog, std::cerr, std::cin
|
|
FILE* fDummy;
|
|
freopen_s(&fDummy, "CONOUT$", "w", stdout);
|
|
freopen_s(&fDummy, "CONOUT$", "w", stderr);
|
|
freopen_s(&fDummy, "CONIN$", "r", stdin);
|
|
SetConsoleTitle(TEXT("Hyperion"));
|
|
}
|