prevent negative PostScreenMessage time

This commit is contained in:
Glenn Maynard
2003-10-10 03:47:45 +00:00
parent 8afe89d22f
commit 0f09ef2103
+7
View File
@@ -57,6 +57,13 @@ ScreenAttract::ScreenAttract( CString sClassName ) : Screen( sClassName )
float fTimeUntilBeginFadingOut = m_Background.GetLengthSeconds() - m_Out.GetLengthSeconds();
if( fTimeUntilBeginFadingOut < 0 )
{
LOG->Warn( "Screen '%s' Out BGAnimation (%f seconds) is longer than Background BGAnimation (%f seconds); background BGA will be truncated",
m_sName.c_str(), m_Out.GetLengthSeconds(), m_Background.GetLengthSeconds() );
fTimeUntilBeginFadingOut = 0;
}
this->PostScreenMessage( SM_BeginFadingOut, fTimeUntilBeginFadingOut );
}