mirror of
https://github.com/SteamFramelyHomebrew/framely.git
synced 2026-10-23 08:02:39 +02:00
8 lines
288 B
C++
8 lines
288 B
C++
#pragma once
|
|
#include <algorithm>
|
|
#include <cmath>
|
|
inline int browser_frame_rate(float refresh){
|
|
// Preserve smooth UI on an unknown display, with a bounded update budget.
|
|
return std::isfinite(refresh)&&refresh>0?std::clamp(int(std::round(std::clamp(refresh,60.f,144.f))),60,144):90;
|
|
}
|