summaryrefslogtreecommitdiffstats
path: root/src/video_core
diff options
context:
space:
mode:
authorFernando Sahmkow <fsahmkow27@gmail.com>2021-07-20 18:29:52 +0200
committerFernando Sahmkow <fsahmkow27@gmail.com>2021-11-16 22:11:27 +0100
commit71ca84d8299f7eb6779e95e808b3ec7f8505354b (patch)
treea837911a9e10aaf6ee4cc5204e929afb55dd1b1a /src/video_core
parentTexture Cache: More rescaling fixes. (diff)
downloadyuzu-71ca84d8299f7eb6779e95e808b3ec7f8505354b.tar
yuzu-71ca84d8299f7eb6779e95e808b3ec7f8505354b.tar.gz
yuzu-71ca84d8299f7eb6779e95e808b3ec7f8505354b.tar.bz2
yuzu-71ca84d8299f7eb6779e95e808b3ec7f8505354b.tar.lz
yuzu-71ca84d8299f7eb6779e95e808b3ec7f8505354b.tar.xz
yuzu-71ca84d8299f7eb6779e95e808b3ec7f8505354b.tar.zst
yuzu-71ca84d8299f7eb6779e95e808b3ec7f8505354b.zip
Diffstat (limited to 'src/video_core')
-rw-r--r--src/video_core/video_core.cpp9
-rw-r--r--src/video_core/video_core.h2
2 files changed, 5 insertions, 6 deletions
diff --git a/src/video_core/video_core.cpp b/src/video_core/video_core.cpp
index cae543a51..508173db3 100644
--- a/src/video_core/video_core.cpp
+++ b/src/video_core/video_core.cpp
@@ -53,11 +53,10 @@ std::unique_ptr<Tegra::GPU> CreateGPU(Core::Frontend::EmuWindow& emu_window, Cor
}
}
-u16 GetResolutionScaleFactor(const RendererBase& renderer) {
- return static_cast<u16>(
- Settings::values.resolution_factor.GetValue() != 0
- ? Settings::values.resolution_factor.GetValue()
- : renderer.GetRenderWindow().GetFramebufferLayout().GetScalingRatio());
+float GetResolutionScaleFactor(const RendererBase& renderer) {
+ return Settings::values.resolution_info.active
+ ? Settings::values.resolution_info.up_factor
+ : renderer.GetRenderWindow().GetFramebufferLayout().GetScalingRatio();
}
} // namespace VideoCore
diff --git a/src/video_core/video_core.h b/src/video_core/video_core.h
index f5c27125d..f86877e86 100644
--- a/src/video_core/video_core.h
+++ b/src/video_core/video_core.h
@@ -25,6 +25,6 @@ class RendererBase;
/// Creates an emulated GPU instance using the given system context.
std::unique_ptr<Tegra::GPU> CreateGPU(Core::Frontend::EmuWindow& emu_window, Core::System& system);
-u16 GetResolutionScaleFactor(const RendererBase& renderer);
+float GetResolutionScaleFactor(const RendererBase& renderer);
} // namespace VideoCore