Fix: Allow 2.00 sec wait period to be changed.
This commit is contained in:
@@ -292,7 +292,7 @@ void StepManiaLanServer::CheckReady()
|
|||||||
//that will not use a lot of CPU.
|
//that will not use a lot of CPU.
|
||||||
//When you try playing the music as soon as it's loaded
|
//When you try playing the music as soon as it's loaded
|
||||||
//it will not always play ... immediately
|
//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
|
//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
|
//during the actual loop that starts the clients. This is in an atempt
|
||||||
|
|||||||
@@ -586,6 +586,9 @@ void PrefsManager::ReadPrefsFromFile( CString sIni )
|
|||||||
#if defined (WITHOUT_NETWORKING)
|
#if defined (WITHOUT_NETWORKING)
|
||||||
#else
|
#else
|
||||||
ini.GetValue( "Options", "LastConnectedServer", m_sLastServer );
|
ini.GetValue( "Options", "LastConnectedServer", m_sLastServer );
|
||||||
|
ini.GetValue( "Options", "ServerWaitSeconds", m_fStartWait );
|
||||||
|
if ( m_fStartWait == 0.0 )
|
||||||
|
m_fStartWait = 2;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
FOREACH( IPreference*, *g_pvpSubscribers, p ) (*p)->ReadFrom( ini );
|
FOREACH( IPreference*, *g_pvpSubscribers, p ) (*p)->ReadFrom( ini );
|
||||||
@@ -836,6 +839,7 @@ void PrefsManager::SaveGlobalPrefsToDisk() const
|
|||||||
#if defined (WITHOUT_NETWORKING)
|
#if defined (WITHOUT_NETWORKING)
|
||||||
#else
|
#else
|
||||||
ini.SetValue( "Options", "LastConnectedServer", m_sLastServer );
|
ini.SetValue( "Options", "LastConnectedServer", m_sLastServer );
|
||||||
|
ini.SetValue( "Options", "ServerWaitSeconds", m_fStartWait );
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
FOREACH_CONST( IPreference*, *g_pvpSubscribers, p ) (*p)->WriteTo( ini );
|
FOREACH_CONST( IPreference*, *g_pvpSubscribers, p ) (*p)->WriteTo( ini );
|
||||||
|
|||||||
@@ -287,9 +287,9 @@ public:
|
|||||||
#else
|
#else
|
||||||
/* Network Info */
|
/* Network Info */
|
||||||
CString m_sLastServer;
|
CString m_sLastServer;
|
||||||
|
float m_fStartWait;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// For self-registering prefs
|
// For self-registering prefs
|
||||||
//
|
//
|
||||||
|
|||||||
Reference in New Issue
Block a user