Free console earlier
This commit is contained in:
parent
af21b8a6d9
commit
daac5489d9
@ -483,6 +483,14 @@ namespace Components
|
||||
Console::SkipShutdown = true;
|
||||
}
|
||||
|
||||
void Console::FreeNativeConsole()
|
||||
{
|
||||
if (Flags::HasFlag("console") || ZoneBuilder::IsEnabled())
|
||||
{
|
||||
FreeConsole();
|
||||
}
|
||||
}
|
||||
|
||||
Console::Console()
|
||||
{
|
||||
// Console '%s: %s> ' string
|
||||
@ -527,7 +535,6 @@ namespace Components
|
||||
}
|
||||
else if (Flags::HasFlag("console") || ZoneBuilder::IsEnabled()) // ZoneBuilder uses the game's console, until the native one is adapted.
|
||||
{
|
||||
FreeConsole();
|
||||
Utils::Hook::Nop(0x60BB58, 11);
|
||||
|
||||
// Redirect input (]command)
|
||||
|
@ -15,6 +15,8 @@ namespace Components
|
||||
|
||||
static void SetSkipShutdown();
|
||||
|
||||
static void FreeNativeConsole();
|
||||
|
||||
private:
|
||||
// Text-based console stuff
|
||||
static WINDOW* OutputWindow;
|
||||
|
@ -17,6 +17,8 @@ namespace Components
|
||||
ExitProcess(0);
|
||||
}
|
||||
|
||||
Console::FreeNativeConsole();
|
||||
|
||||
if (Dedicated::IsEnabled() || ZoneBuilder::IsEnabled()) return;
|
||||
|
||||
Singleton::FirstInstance = (CreateMutexA(NULL, FALSE, "iw4x_mutex") && GetLastError() != ERROR_ALREADY_EXISTS);
|
||||
|
Loading…
x
Reference in New Issue
Block a user