Deal with corner case.

The hardcoded 600 will soon become a metric.
This commit is contained in:
Jason Felds
2011-07-03 13:35:00 -04:00
parent b9e267c0b0
commit 1574de2c25
3 changed files with 15 additions and 2 deletions
+6 -1
View File
@@ -360,12 +360,17 @@ float DisplayBpms::GetMin() const
}
float DisplayBpms::GetMax() const
{
return this->GetMaxWithin();
}
float DisplayBpms::GetMaxWithin(float highest) const
{
float fMax = 0;
FOREACH_CONST( float, vfBpms, f )
{
if( *f != -1 )
fMax = max( fMax, *f );
fMax = clamp(max( fMax, *f ), 0, highest);
}
return fMax;
}