simplify
This commit is contained in:
@@ -794,15 +794,13 @@ static void ReadGamePrefsFromDisk()
|
|||||||
if( INPUTMAPPER )
|
if( INPUTMAPPER )
|
||||||
INPUTMAPPER->ReadMappingsFromDisk();
|
INPUTMAPPER->ReadMappingsFromDisk();
|
||||||
|
|
||||||
RString sGameName = GAMESTATE->GetCurrentGame()->m_szName;
|
RString sAnnouncer = PREFSMAN->m_sAnnouncer;
|
||||||
RString sAnnouncer = sGameName;
|
RString sTheme = PREFSMAN->m_sTheme;
|
||||||
RString sTheme = sGameName;
|
|
||||||
|
|
||||||
// if these calls fail, the three strings will keep the initial values set above.
|
if( sAnnouncer.empty() )
|
||||||
if( !PREFSMAN->m_sAnnouncer.Get().empty() )
|
sAnnouncer = GAMESTATE->GetCurrentGame()->m_szName;
|
||||||
sAnnouncer = PREFSMAN->m_sAnnouncer;
|
if( sTheme.empty() )
|
||||||
if( !PREFSMAN->m_sTheme.Get().empty() )
|
sTheme = GAMESTATE->GetCurrentGame()->m_szName;
|
||||||
sTheme = PREFSMAN->m_sTheme;
|
|
||||||
|
|
||||||
// it's OK to call these functions with names that don't exist.
|
// it's OK to call these functions with names that don't exist.
|
||||||
ANNOUNCER->SwitchAnnouncer( sAnnouncer );
|
ANNOUNCER->SwitchAnnouncer( sAnnouncer );
|
||||||
|
|||||||
Reference in New Issue
Block a user