diff --git a/stepmania/src/NetworkSyncServer.cpp b/stepmania/src/NetworkSyncServer.cpp index 170fa38b50..fc54ac2099 100644 --- a/stepmania/src/NetworkSyncServer.cpp +++ b/stepmania/src/NetworkSyncServer.cpp @@ -292,7 +292,7 @@ void StepManiaLanServer::CheckReady() //that will not use a lot of CPU. //When you try playing the music as soon as it's loaded //it will not always play ... immediately - usleep ( 2000000 ); + usleep ( int( PREFSMAN->m_fStartWait * 1000000.0 ) ); //The next three loops are seperate because we want to minimize what is done //during the actual loop that starts the clients. This is in an atempt diff --git a/stepmania/src/PrefsManager.cpp b/stepmania/src/PrefsManager.cpp index fd41758a34..63b169e9d7 100644 --- a/stepmania/src/PrefsManager.cpp +++ b/stepmania/src/PrefsManager.cpp @@ -586,6 +586,9 @@ void PrefsManager::ReadPrefsFromFile( CString sIni ) #if defined (WITHOUT_NETWORKING) #else ini.GetValue( "Options", "LastConnectedServer", m_sLastServer ); + ini.GetValue( "Options", "ServerWaitSeconds", m_fStartWait ); + if ( m_fStartWait == 0.0 ) + m_fStartWait = 2; #endif FOREACH( IPreference*, *g_pvpSubscribers, p ) (*p)->ReadFrom( ini ); @@ -836,6 +839,7 @@ void PrefsManager::SaveGlobalPrefsToDisk() const #if defined (WITHOUT_NETWORKING) #else ini.SetValue( "Options", "LastConnectedServer", m_sLastServer ); + ini.SetValue( "Options", "ServerWaitSeconds", m_fStartWait ); #endif FOREACH_CONST( IPreference*, *g_pvpSubscribers, p ) (*p)->WriteTo( ini ); diff --git a/stepmania/src/PrefsManager.h b/stepmania/src/PrefsManager.h index 3dcfe4f0d9..70c50d74a3 100644 --- a/stepmania/src/PrefsManager.h +++ b/stepmania/src/PrefsManager.h @@ -287,9 +287,9 @@ public: #else /* Network Info */ CString m_sLastServer; + float m_fStartWait; #endif - // // For self-registering prefs //