I'm not sure why this ClearSubscribers was here; it's causing

metrics to not be loaded after a resolution change, because
the reload is optimized out by SwitchThemeAndLanguage.
(We may have loaded ThemeMetrics on demand in the
past.)

The reload needs to always happen, even though the theme
hasn't changed, since the theme load is affected by the
resolution; eg. upvalues in Lua scripts may have been
computed based on SCREEN_WIDTH.
This commit is contained in:
Glenn Maynard
2007-02-11 01:52:41 +00:00
parent b88d415b52
commit ee061be26a
5 changed files with 13 additions and 14 deletions
+4 -1
View File
@@ -123,8 +123,11 @@ void ScreenOptionsMaster::HandleScreenMessage( const ScreenMessage SM )
(m_iChangeMask & OPT_APPLY_GRAPHICS) ||
(m_iChangeMask & OPT_APPLY_ASPECT_RATIO) )
{
/* If the resolution or aspect ratio changes, always reload the theme. Otherwise,
* only reload it if it changed. */
RString sNewTheme = PREFSMAN->m_sTheme.Get();
GameLoop::ChangeTheme( sNewTheme, this->GetNextScreen() );
bool bForceThemeReload = !!(m_iChangeMask & OPT_APPLY_ASPECT_RATIO) || !!(m_iChangeMask & OPT_APPLY_GRAPHICS);
GameLoop::ChangeTheme( sNewTheme, this->GetNextScreen(), bForceThemeReload );
StepMania::ApplyGraphicOptions();
}