File diff r24978:42151fac26c3 → r24979:f3498e0538dc
src/framerate_gui.cpp
Show inline comments
 
@@ -396,22 +396,20 @@ struct FramerateWindow : Window {
 
		uint32 value;
 

	
 
		inline void SetRate(double value, double target)
 
		{
 
			const double threshold_good = target * 0.95;
 
			const double threshold_bad = target * 2 / 3;
 
			value = std::min(9999.99, value);
 
			this->value = (uint32)(value * 100);
 
			this->strid = (value > threshold_good) ? STR_FRAMERATE_FPS_GOOD : (value < threshold_bad) ? STR_FRAMERATE_FPS_BAD : STR_FRAMERATE_FPS_WARN;
 
		}
 

	
 
		inline void SetTime(double value, double target)
 
		{
 
			const double threshold_good = target / 3;
 
			const double threshold_bad = target;
 
			value = std::min(9999.99, value);
 
			this->value = (uint32)(value * 100);
 
			this->strid = (value < threshold_good) ? STR_FRAMERATE_MS_GOOD : (value > threshold_bad) ? STR_FRAMERATE_MS_BAD : STR_FRAMERATE_MS_WARN;
 
		}
 

	
 
		inline void InsertDParams(uint n) const
 
		{