move a couple preferences out of PrefsManager
- eventually, this will reduce the gargantuan PrefsManager - adding prefs doesn't require modifying PrefsManager.h and recompiling a lot - starting with these options because they aren't in ScreenOptionsMaster
This commit is contained in:
@@ -12,6 +12,8 @@ StepManiaLanServer::StepManiaLanServer() { }
|
||||
StepManiaLanServer::~StepManiaLanServer() { }
|
||||
#else
|
||||
|
||||
static Preference<float> g_fStartWait( Options, "ServerWaitSeconds", 2 );
|
||||
|
||||
LanPlayer::LanPlayer()
|
||||
{
|
||||
score = 0;
|
||||
@@ -295,7 +297,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 ( int( PREFSMAN->m_fStartWait * 1000000.0 ) );
|
||||
usleep( int( g_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
|
||||
|
||||
@@ -32,6 +32,8 @@ OptionRowData g_NetworkOptionsLines[NUM_NETWORK_OPTIONS_LINES] = {
|
||||
const ScreenMessage SM_DoneConnecting = ScreenMessage(SM_User+1);
|
||||
const ScreenMessage SM_ServerNameEnter = ScreenMessage(SM_User+2);
|
||||
|
||||
static Preference<CString> g_sLastServer( Options, "LastConnectedServer", "" );
|
||||
|
||||
REGISTER_SCREEN_CLASS( ScreenNetworkOptions );
|
||||
ScreenNetworkOptions::ScreenNetworkOptions( CString sClassName ) : ScreenOptions( sClassName )
|
||||
{
|
||||
@@ -79,10 +81,7 @@ void ScreenNetworkOptions::HandleScreenMessage( const ScreenMessage SM )
|
||||
NSMAN->PostStartUp(sNewName);
|
||||
NSMAN->DisplayStartupStatus();
|
||||
UpdateConnectStatus( );
|
||||
#if defined( WITHOUT_NETWORKING )
|
||||
#else
|
||||
PREFSMAN->m_sLastServer = ScreenTextEntry::s_sLastAnswer;
|
||||
#endif
|
||||
g_sLastServer = ScreenTextEntry::s_sLastAnswer;
|
||||
}
|
||||
break;
|
||||
case SM_ServerNameEnter:
|
||||
@@ -115,7 +114,7 @@ void ScreenNetworkOptions::MenuStart( PlayerNumber pn, const InputEventType type
|
||||
if ( !NSMAN->useSMserver )
|
||||
{
|
||||
VIRTUALKB.Reset(VKMODE_IP);
|
||||
SCREENMAN->TextEntry( SM_DoneConnecting, "Enter a Network Address\n127.0.0.1 to connect to yourself", PREFSMAN->m_sLastServer );
|
||||
SCREENMAN->TextEntry( SM_DoneConnecting, "Enter a Network Address\n127.0.0.1 to connect to yourself", g_sLastServer );
|
||||
}
|
||||
else {
|
||||
NSMAN->CloseConnection();
|
||||
|
||||
Reference in New Issue
Block a user