summaryrefslogtreecommitdiffstats
path: root/src/common
diff options
context:
space:
mode:
authorFernando Sahmkow <fsahmkow27@gmail.com>2021-07-18 18:40:14 +0200
committerFernando Sahmkow <fsahmkow27@gmail.com>2021-11-16 22:11:27 +0100
commit22f4b290b6f0894d29302102f539dd8753961f04 (patch)
treed0777996569139bb07a152bedd03509951da0402 /src/common
parentMerge pull request #7326 from ameerj/vp8 (diff)
downloadyuzu-22f4b290b6f0894d29302102f539dd8753961f04.tar
yuzu-22f4b290b6f0894d29302102f539dd8753961f04.tar.gz
yuzu-22f4b290b6f0894d29302102f539dd8753961f04.tar.bz2
yuzu-22f4b290b6f0894d29302102f539dd8753961f04.tar.lz
yuzu-22f4b290b6f0894d29302102f539dd8753961f04.tar.xz
yuzu-22f4b290b6f0894d29302102f539dd8753961f04.tar.zst
yuzu-22f4b290b6f0894d29302102f539dd8753961f04.zip
Diffstat (limited to 'src/common')
-rw-r--r--src/common/settings.cpp1
-rw-r--r--src/common/settings.h18
2 files changed, 19 insertions, 0 deletions
diff --git a/src/common/settings.cpp b/src/common/settings.cpp
index 9dd5e3efb..8c6be2c84 100644
--- a/src/common/settings.cpp
+++ b/src/common/settings.cpp
@@ -47,6 +47,7 @@ void LogSettings() {
log_setting("System_TimeZoneIndex", values.time_zone_index.GetValue());
log_setting("Core_UseMultiCore", values.use_multi_core.GetValue());
log_setting("CPU_Accuracy", values.cpu_accuracy.GetValue());
+ log_setting("Renderer_UseResolutionScaling", values.resolution_setup.GetValue());
log_setting("Renderer_UseResolutionFactor", values.resolution_factor.GetValue());
log_setting("Renderer_UseSpeedLimit", values.use_speed_limit.GetValue());
log_setting("Renderer_SpeedLimit", values.speed_limit.GetValue());
diff --git a/src/common/settings.h b/src/common/settings.h
index 9ff4cf85d..08f3da055 100644
--- a/src/common/settings.h
+++ b/src/common/settings.h
@@ -52,6 +52,22 @@ enum class NvdecEmulation : u32 {
GPU = 2,
};
+enum class ResolutionSetup : u32 {
+ Res1_2X = 0,
+ Res3_4X = 1,
+ Res1X = 2,
+ Res3_2K = 3,
+ Res2X = 4,
+ Res3X = 5,
+};
+
+struct ResolutionScalingInfo {
+ u32 up_scale{2};
+ u32 down_shift{0};
+ f32 up_factor{2.0f};
+ f32 down_factor{0.5f};
+};
+
/** The BasicSetting class is a simple resource manager. It defines a label and default value
* alongside the actual value of the setting for simpler and less-error prone use with frontend
* configurations. Setting a default value and label is required, though subclasses may deviate from
@@ -451,6 +467,8 @@ struct Values {
"disable_shader_loop_safety_checks"};
Setting<int> vulkan_device{0, "vulkan_device"};
+ ResolutionScalingInfo resolution_info{};
+ Setting<ResolutionSetup> resolution_setup{ResolutionSetup::Res1X, "resolution_setup"};
Setting<u16> resolution_factor{1, "resolution_factor"};
// *nix platforms may have issues with the borderless windowed fullscreen mode.
// Default to exclusive fullscreen on these platforms for now.