mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-11-23 21:39:52 +00:00
UI: Show slow message based on refresh rate.
It was always showing because it wasn't divided by 1000.
This commit is contained in:
parent
5175abe1fd
commit
79cb51aa91
@ -406,14 +406,15 @@ static bool IsRunningSlow() {
|
||||
// Look at only the last 15 samples (starting at the 14th sample behind current.)
|
||||
int rangeStart = fpsHistoryPos - std::min(fpsHistoryValid, 14);
|
||||
|
||||
double best = 0.0f;
|
||||
double best = 0.0;
|
||||
for (int i = rangeStart; i <= fpsHistoryPos; ++i) {
|
||||
// rangeStart may have been negative if near a wrap around.
|
||||
int index = (fpsHistorySize + i) % fpsHistorySize;
|
||||
best = std::max(fpsHistory[index], best);
|
||||
}
|
||||
|
||||
return best < System_GetPropertyInt(SYSPROP_DISPLAY_REFRESH_RATE) / 1.001f;
|
||||
// Note that SYSPROP_DISPLAY_REFRESH_RATE is multiplied by 1000.
|
||||
return best < System_GetPropertyInt(SYSPROP_DISPLAY_REFRESH_RATE) * (1.0 / 1001.0);
|
||||
}
|
||||
|
||||
return false;
|
||||
|
Loading…
Reference in New Issue
Block a user