summaryrefslogtreecommitdiffstats
path: root/src/common
diff options
context:
space:
mode:
authorlat9nq <22451773+lat9nq@users.noreply.github.com>2023-08-16 04:41:50 +0200
committerlat9nq <22451773+lat9nq@users.noreply.github.com>2023-08-16 04:41:50 +0200
commit3e28e85468cafb928cda5dc9210eba95af26e212 (patch)
tree50d3cb165db3d6c89cfaa6562236b114e32f2144 /src/common
parentMerge pull request #11271 from t895/settings-tweaks (diff)
downloadyuzu-3e28e85468cafb928cda5dc9210eba95af26e212.tar
yuzu-3e28e85468cafb928cda5dc9210eba95af26e212.tar.gz
yuzu-3e28e85468cafb928cda5dc9210eba95af26e212.tar.bz2
yuzu-3e28e85468cafb928cda5dc9210eba95af26e212.tar.lz
yuzu-3e28e85468cafb928cda5dc9210eba95af26e212.tar.xz
yuzu-3e28e85468cafb928cda5dc9210eba95af26e212.tar.zst
yuzu-3e28e85468cafb928cda5dc9210eba95af26e212.zip
Diffstat (limited to 'src/common')
-rw-r--r--src/common/settings.cpp10
-rw-r--r--src/common/settings.h1
-rw-r--r--src/common/settings_enums.h2
3 files changed, 10 insertions, 3 deletions
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) {
diff --git a/src/common/settings.h b/src/common/settings.h
index b0bc6519a..4407c1e6d 100644
--- a/src/common/settings.h
+++ b/src/common/settings.h
@@ -525,6 +525,7 @@ std::string GetTimeZoneString(TimeZone time_zone);
void LogSettings();
+void TranslateResolutionInfo(ResolutionSetup setup, ResolutionScalingInfo& info);
void UpdateRescalingInfo();
// Restore the global state of all applicable settings in the Values struct
diff --git a/src/common/settings_enums.h b/src/common/settings_enums.h
index e7cb59ea5..4edfd2bfb 100644
--- a/src/common/settings_enums.h
+++ b/src/common/settings_enums.h
@@ -146,6 +146,8 @@ ENUM(AntiAliasing, None, Fxaa, Smaa, MaxEnum);
ENUM(AspectRatio, R16_9, R4_3, R21_9, R16_10, Stretch);
+ENUM(ScreenshotAspectRatio, Auto, R16_9, R4_3, R21_9, R16_10);
+
template <typename Type>
inline std::string CanonicalizeEnum(Type id) {
const auto group = EnumMetadata<Type>::Canonicalizations();