From 3e28e85468cafb928cda5dc9210eba95af26e212 Mon Sep 17 00:00:00 2001 From: lat9nq <22451773+lat9nq@users.noreply.github.com> Date: Tue, 15 Aug 2023 22:41:50 -0400 Subject: settings: Add AspectRatio enum, split res scale function --- src/common/settings.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src/common/settings.cpp') diff --git a/src/common/settings.cpp b/src/common/settings.cpp index 15fd2e222..16a58a750 100644 --- a/src/common/settings.cpp +++ b/src/common/settings.cpp @@ -207,9 +207,7 @@ const char* TranslateCategory(Category category) { return "Miscellaneous"; } -void UpdateRescalingInfo() { - const auto setup = values.resolution_setup.GetValue(); - auto& info = values.resolution_info; +void TranslateResolutionInfo(ResolutionSetup setup, ResolutionScalingInfo& info) { info.downscale = false; switch (setup) { case ResolutionSetup::Res1_2X: @@ -269,6 +267,12 @@ void UpdateRescalingInfo() { info.active = info.up_scale != 1 || info.down_shift != 0; } +void UpdateRescalingInfo() { + const auto setup = values.resolution_setup.GetValue(); + auto& info = values.resolution_info; + TranslateResolutionInfo(setup, info); +} + void RestoreGlobalState(bool is_powered_on) { // If a game is running, DO NOT restore the global settings state if (is_powered_on) { -- cgit v1.2.3