Skip to content

Commit 88418eb

Browse files
committed
launcher: multirun should work on POSIX now
1 parent db6a983 commit 88418eb

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

launcher/launcher.cpp

+5-5
Original file line numberDiff line numberDiff line change
@@ -1278,6 +1278,10 @@ DLL_EXPORT int LauncherMain( int argc, char **argv )
12781278
// Figure out the directory the executable is running from
12791279
UTIL_ComputeBaseDir();
12801280

1281+
// Allow the user to explicitly say they want to be able to run multiple instances of the source mutex.
1282+
// Useful for side-by-side comparisons of different renderers.
1283+
bool multiRun = CommandLine()->CheckParm( "-multirun" ) != NULL;
1284+
12811285
#if defined( _X360 )
12821286
bool bSpewDllInfo = CommandLine()->CheckParm( "-dllinfo" );
12831287
bool bWaitForConsole = CommandLine()->CheckParm( "-vxconsole" );
@@ -1389,10 +1393,6 @@ DLL_EXPORT int LauncherMain( int argc, char **argv )
13891393
// Can only run one windowed source app at a time
13901394
if ( !GrabSourceMutex() )
13911395
{
1392-
// Allow the user to explicitly say they want to be able to run multiple instances of the source mutex.
1393-
// Useful for side-by-side comparisons of different renderers.
1394-
bool multiRun = CommandLine()->CheckParm( "-multirun" ) != NULL;
1395-
13961396
// We're going to hijack the existing session and load a new savegame into it. This will mainly occur when users click on links in Bugzilla that will automatically copy saves and load them
13971397
// directly from the web browser. The -hijack command prevents the launcher from objecting that there is already an instance of the game.
13981398
if (CommandLine()->CheckParm( "-hijack" ))
@@ -1443,7 +1443,7 @@ DLL_EXPORT int LauncherMain( int argc, char **argv )
14431443
#elif defined( POSIX )
14441444
else
14451445
{
1446-
if ( !GrabSourceMutex() )
1446+
if ( !GrabSourceMutex() && !multiRun )
14471447
{
14481448
::MessageBox(NULL, "Only one instance of the game can be running at one time.", "Source - Warning", 0 );
14491449
return -1;

0 commit comments

Comments
 (0)