Deal with corner case.
The hardcoded 600 will soon become a metric.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user