#include <stdio.h>
#include <Windows.h>

#include "console.hpp"

void console::Initialize() {
#ifdef SDK_ENABLE_LOGGING
    AllocConsole();
    SetConsoleTitleA("razehack");
    freopen_s(reinterpret_cast<FILE**> stdout, "CONOUT$", "w", stdout);
#endif
}

void console::Shutdown() {
#ifdef SDK_ENABLE_LOGGING
    fclose(stdout);
    FreeConsole();
#endif
}
