Singleton: Allow multiple IW4x instances non-interactively when unit testing.

This commit is contained in:
/dev/urandom 2016-09-13 23:52:15 +02:00
parent afbd8f13ca
commit e18ac7be16
No known key found for this signature in database
GPG Key ID: 41322B973E0F295E

View File

@ -19,7 +19,7 @@ namespace Components
Console::FreeNativeConsole(); Console::FreeNativeConsole();
if (Dedicated::IsEnabled() || ZoneBuilder::IsEnabled()) return; if (Loader::PerformingUnitTests() || 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);