Always allow multiple instances

This commit is contained in:
dhewg 2012-01-08 12:15:44 +01:00
parent 438685e6e6
commit 6a1d6cb842
5 changed files with 0 additions and 37 deletions

View file

@ -2798,10 +2798,6 @@ void idCommonLocal::Init( int argc, char **argv ) {
// override cvars from command line
StartupVariable( NULL, false );
if ( !idAsyncNetwork::serverDedicated.GetInteger() && Sys_AlreadyRunning() ) {
Sys_Quit();
}
// initialize processor specific SIMD implementation
InitSIMD();

View file

@ -385,16 +385,6 @@ int Sys_GetDriveFreeSpace( const char *path ) {
return 1000 * 1024;
}
/*
================
Sys_AlreadyRunning
return true if there is a copy of D3 running already
================
*/
bool Sys_AlreadyRunning( void ) {
return false;
}
/*
===============
Posix_EarlyInit

View file

@ -123,8 +123,6 @@ void Sys_Shutdown( void );
void Sys_Error( const char *error, ...);
void Sys_Quit( void );
bool Sys_AlreadyRunning( void );
// note that this isn't journaled...
char * Sys_GetClipboardData( void );
void Sys_SetClipboardData( const char *string );

View file

@ -81,7 +81,6 @@ struct Win32Vars_t {
static idCVar win_outputDebugString;
static idCVar win_outputEditString;
static idCVar win_viewlog;
static idCVar win_allowMultipleInstances;
};
extern Win32Vars_t win32;

View file

@ -55,7 +55,6 @@ If you have questions concerning this license or the applicable additional terms
idCVar Win32Vars_t::win_outputDebugString( "win_outputDebugString", "0", CVAR_SYSTEM | CVAR_BOOL, "" );
idCVar Win32Vars_t::win_outputEditString( "win_outputEditString", "1", CVAR_SYSTEM | CVAR_BOOL, "" );
idCVar Win32Vars_t::win_viewlog( "win_viewlog", "0", CVAR_SYSTEM | CVAR_INTEGER, "" );
idCVar Win32Vars_t::win_allowMultipleInstances( "win_allowMultipleInstances", "0", CVAR_SYSTEM | CVAR_BOOL, "allow multiple instances running concurrently" );
Win32Vars_t win32;
@ -440,25 +439,6 @@ void Sys_DLL_Unload( uintptr_t dllHandle ) {
}
}
/*
================
Sys_AlreadyRunning
returns true if there is a copy of D3 running already
================
*/
bool Sys_AlreadyRunning( void ) {
#ifndef DEBUG
if ( !win32.win_allowMultipleInstances.GetBool() ) {
HANDLE hMutexOneInstance = ::CreateMutex( NULL, FALSE, "DOOM3" );
if ( ::GetLastError() == ERROR_ALREADY_EXISTS || ::GetLastError() == ERROR_ACCESS_DENIED ) {
return true;
}
}
#endif
return false;
}
/*
================
Sys_Init