Revert the Auto policy
This commit is contained in:
parent
9b20c6c609
commit
59384de777
1 changed files with 12 additions and 124 deletions
|
|
@ -380,34 +380,9 @@ void UpdateRescalingInfo() {
|
|||
TranslateResolutionInfo(setup, info);
|
||||
}
|
||||
|
||||
u32 FrameGenMultiplierCeiling() {
|
||||
const u32 configured = values.frame_gen_multiplier.GetValue();
|
||||
if (configured == AUTO_FRAME_GEN_MULTIPLIER) {
|
||||
return MAX_FRAME_GEN_MULTIPLIER;
|
||||
}
|
||||
return std::clamp(configured, MIN_FRAME_GEN_MULTIPLIER, MAX_FRAME_GEN_MULTIPLIER);
|
||||
}
|
||||
|
||||
u32 FrameGenMultiplier() {
|
||||
const u32 ceiling = FrameGenMultiplierCeiling();
|
||||
|
||||
const float refresh = values.display_refresh_rate;
|
||||
if (refresh <= 1.0f) {
|
||||
return ceiling;
|
||||
}
|
||||
|
||||
constexpr float UNMEASURED_GUEST_FRAME_RATE = 60.0f;
|
||||
float base = values.guest_frame_rate > 1.0f ? values.guest_frame_rate
|
||||
: UNMEASURED_GUEST_FRAME_RATE;
|
||||
if (values.use_speed_limit.GetValue()) {
|
||||
const u16 limit = std::min<u16>(SpeedLimit(), 100);
|
||||
if (limit > 0) {
|
||||
base *= static_cast<float>(limit) / 100.0f;
|
||||
}
|
||||
}
|
||||
|
||||
const u32 presentable = static_cast<u32>(refresh / std::max(base, 1.0f));
|
||||
return std::min(ceiling, std::max(presentable, 1u));
|
||||
return std::clamp(values.frame_gen_multiplier.GetValue(), MIN_FRAME_GEN_MULTIPLIER,
|
||||
MAX_FRAME_GEN_MULTIPLIER);
|
||||
}
|
||||
|
||||
size_t FrameGenGenerations() {
|
||||
|
|
|
|||
Loading…
Reference in a new issue