Merge remote-tracking branch 'upstream/1.11' into 1.11
This commit is contained in:
@@ -151,6 +151,10 @@ namespace {
|
||||
/* Total duration covered by collected points */
|
||||
TimingMeasurement total = 0;
|
||||
|
||||
/* We have nothing to compare the first point against */
|
||||
point--;
|
||||
if (point < 0) point = NUM_FRAMERATE_POINTS - 1;
|
||||
|
||||
while (point != last_point) {
|
||||
/* Only record valid data points, but pretend the gaps in measurements aren't there */
|
||||
if (this->durations[point] != INVALID_DURATION) {
|
||||
@@ -185,7 +189,7 @@ namespace {
|
||||
PerformanceData(1), // PFE_ACC_GL_AIRCRAFT
|
||||
PerformanceData(1), // PFE_GL_LANDSCAPE
|
||||
PerformanceData(1), // PFE_GL_LINKGRAPH
|
||||
PerformanceData(GL_RATE), // PFE_DRAWING
|
||||
PerformanceData(1000.0 / 30), // PFE_DRAWING
|
||||
PerformanceData(1), // PFE_ACC_DRAWWORLD
|
||||
PerformanceData(60.0), // PFE_VIDEO
|
||||
PerformanceData(1000.0 * 8192 / 44100), // PFE_SOUND
|
||||
@@ -270,6 +274,7 @@ void PerformanceMeasurer::SetExpectedRate(double rate)
|
||||
*/
|
||||
/* static */ void PerformanceMeasurer::Paused(PerformanceElement elem)
|
||||
{
|
||||
PerformanceMeasurer::SetInactive(elem);
|
||||
_pf_data[elem].AddPause(GetPerformanceTimer());
|
||||
}
|
||||
|
||||
@@ -395,7 +400,6 @@ struct FramerateWindow : Window {
|
||||
{
|
||||
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;
|
||||
}
|
||||
@@ -404,7 +408,6 @@ struct FramerateWindow : Window {
|
||||
{
|
||||
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;
|
||||
}
|
||||
@@ -464,7 +467,7 @@ struct FramerateWindow : Window {
|
||||
this->speed_gameloop.SetRate(gl_rate / _pf_data[PFE_GAMELOOP].expected_rate, 1.0);
|
||||
if (this->small) return; // in small mode, this is everything needed
|
||||
|
||||
this->rate_drawing.SetRate(_pf_data[PFE_DRAWING].GetRate(), _pf_data[PFE_DRAWING].expected_rate);
|
||||
this->rate_drawing.SetRate(_pf_data[PFE_DRAWING].GetRate(), _settings_client.gui.refresh_rate);
|
||||
|
||||
int new_active = 0;
|
||||
for (PerformanceElement e = PFE_FIRST; e < PFE_MAX; e++) {
|
||||
|
||||
Reference in New Issue
Block a user