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