diff options
Diffstat (limited to 'src/common/settings.cpp')
| -rw-r--r-- | src/common/settings.cpp | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/common/settings.cpp b/src/common/settings.cpp index db318613dd..6cc976fe51 100644 --- a/src/common/settings.cpp +++ b/src/common/settings.cpp @@ -380,6 +380,28 @@ void UpdateRescalingInfo() { TranslateResolutionInfo(setup, info); } +u32 FrameGenMultiplier() { + return std::clamp(values.frame_gen_multiplier.GetValue(), MIN_FRAME_GEN_MULTIPLIER, + MAX_FRAME_GEN_MULTIPLIER); +} + +size_t FrameGenGenerations() { + if (!values.frame_gen.GetValue()) { + return 0; + } + return FrameGenMultiplier() - 1; +} + +size_t FrameGenMaxGenerations() { + if (!values.frame_gen.GetValue()) { + return 0; + } + if (values.frame_gen_target_rate.GetValue() != 0) { + return MAX_FRAME_GEN_MULTIPLIER - 1; + } + return FrameGenMultiplier() - 1; +} + void RestoreGlobalState(bool is_powered_on) { // If a game is running, DO NOT restore the global settings state if (is_powered_on) { |
