summaryrefslogtreecommitdiffstats
path: root/src/core
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2021-11-21 11:31:32 +0100
committerGitHub <noreply@github.com>2021-11-21 11:31:32 +0100
commit5082712b4e44ebfe48bd587ea2fa38767b7339cb (patch)
treecd2a9393ea5e7d83938baf1f069fc2689e8398af /src/core
parentMerge pull request #7359 from heinermann/kthread_crash (diff)
parentFix screenshot dimensions when at 1x scale (diff)
downloadyuzu-5082712b4e44ebfe48bd587ea2fa38767b7339cb.tar
yuzu-5082712b4e44ebfe48bd587ea2fa38767b7339cb.tar.gz
yuzu-5082712b4e44ebfe48bd587ea2fa38767b7339cb.tar.bz2
yuzu-5082712b4e44ebfe48bd587ea2fa38767b7339cb.tar.lz
yuzu-5082712b4e44ebfe48bd587ea2fa38767b7339cb.tar.xz
yuzu-5082712b4e44ebfe48bd587ea2fa38767b7339cb.tar.zst
yuzu-5082712b4e44ebfe48bd587ea2fa38767b7339cb.zip
Diffstat (limited to '')
-rw-r--r--src/core/frontend/framebuffer_layout.cpp7
-rw-r--r--src/core/frontend/framebuffer_layout.h11
2 files changed, 7 insertions, 11 deletions
diff --git a/src/core/frontend/framebuffer_layout.cpp b/src/core/frontend/framebuffer_layout.cpp
index 4b58b672a..26a5b12aa 100644
--- a/src/core/frontend/framebuffer_layout.cpp
+++ b/src/core/frontend/framebuffer_layout.cpp
@@ -25,7 +25,12 @@ FramebufferLayout DefaultFrameLayout(u32 width, u32 height) {
ASSERT(height > 0);
// The drawing code needs at least somewhat valid values for both screens
// so just calculate them both even if the other isn't showing.
- FramebufferLayout res{width, height, false, {}};
+ FramebufferLayout res{
+ .width = width,
+ .height = height,
+ .screen = {},
+ .is_srgb = false,
+ };
const float window_aspect_ratio = static_cast<float>(height) / static_cast<float>(width);
const float emulation_aspect_ratio = EmulationAspectRatio(
diff --git a/src/core/frontend/framebuffer_layout.h b/src/core/frontend/framebuffer_layout.h
index 2e36c0163..8e341e4e2 100644
--- a/src/core/frontend/framebuffer_layout.h
+++ b/src/core/frontend/framebuffer_layout.h
@@ -35,17 +35,8 @@ enum class AspectRatio {
struct FramebufferLayout {
u32 width{ScreenUndocked::Width};
u32 height{ScreenUndocked::Height};
- bool is_srgb{};
-
Common::Rectangle<u32> screen;
-
- /**
- * Returns the ration of pixel size of the screen, compared to the native size of the undocked
- * Switch screen.
- */
- float GetScalingRatio() const {
- return static_cast<float>(screen.GetWidth()) / ScreenUndocked::Width;
- }
+ bool is_srgb{};
};
/**