Macro for native console window
This commit is contained in:
parent
dfc98bb475
commit
c20b0c50ab
@ -30,7 +30,9 @@ namespace console
|
||||
|
||||
if (process == GetCurrentProcessId() || IsDebuggerPresent())
|
||||
{
|
||||
#ifndef NATIVE_CONSOLE
|
||||
ShowWindow(con_window, SW_HIDE);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@ -66,12 +68,14 @@ namespace console
|
||||
{
|
||||
hide_console();
|
||||
|
||||
#ifdef NATIVE_CONSOLE
|
||||
setvbuf(stdout, nullptr, _IONBF, 0);
|
||||
setvbuf(stderr, nullptr, _IONBF, 0);
|
||||
#else
|
||||
(void)_pipe(this->handles_, 1024, _O_TEXT);
|
||||
(void)_dup2(this->handles_[1], 1);
|
||||
(void)_dup2(this->handles_[1], 2);
|
||||
|
||||
//setvbuf(stdout, nullptr, _IONBF, 0);
|
||||
//setvbuf(stderr, nullptr, _IONBF, 0);
|
||||
#endif
|
||||
}
|
||||
|
||||
void post_start() override
|
||||
@ -133,7 +137,9 @@ namespace console
|
||||
{
|
||||
if (game::environment::is_dedi() || !utils::flags::has_flag("noconsole"))
|
||||
{
|
||||
#ifndef NATIVE_CONSOLE
|
||||
game::Sys_ShowConsole();
|
||||
#endif
|
||||
}
|
||||
|
||||
if (!game::environment::is_dedi())
|
||||
|
@ -166,7 +166,6 @@ namespace game
|
||||
* Variables
|
||||
**************************************************************/
|
||||
|
||||
|
||||
WEAK symbol<CmdArgs> sv_cmd_args{0, 0x14946BA20};
|
||||
|
||||
WEAK symbol<const char*> command_whitelist{0x141079A60, 0x14120C360};
|
||||
|
Loading…
Reference in New Issue
Block a user