mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2026-08-28 09:41:36 +00:00
Revert the Auto policy
This commit is contained in:
+2
-27
@@ -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() {
|
||||
|
||||
@@ -392,8 +392,8 @@ struct Values {
|
||||
Specialization::Default, true, false};
|
||||
|
||||
SwitchableSetting<u32, true> frame_gen_multiplier{linkage,
|
||||
0,
|
||||
0,
|
||||
2,
|
||||
2,
|
||||
4,
|
||||
"frame_gen_multiplier",
|
||||
Category::Renderer,
|
||||
@@ -914,19 +914,13 @@ struct Values {
|
||||
// Per-game overrides
|
||||
bool use_squashed_iterated_blend;
|
||||
|
||||
// Rates published by the frontend, in hertz. Zero means not measured yet.
|
||||
float display_refresh_rate;
|
||||
float guest_frame_rate;
|
||||
};
|
||||
|
||||
extern Values values;
|
||||
|
||||
constexpr u32 AUTO_FRAME_GEN_MULTIPLIER = 0;
|
||||
constexpr u32 MIN_FRAME_GEN_MULTIPLIER = 2;
|
||||
constexpr u32 MAX_FRAME_GEN_MULTIPLIER = 4;
|
||||
|
||||
[[nodiscard]] u32 FrameGenMultiplierCeiling();
|
||||
|
||||
[[nodiscard]] u32 FrameGenMultiplier();
|
||||
|
||||
[[nodiscard]] size_t FrameGenGenerations();
|
||||
|
||||
Reference in New Issue
Block a user