diff options
author | Yuri Kunde Schlesner <yuriks@yuriks.net> | 2017-05-28 03:06:59 +0200 |
---|---|---|
committer | Yuri Kunde Schlesner <yuriks@yuriks.net> | 2017-05-28 03:41:24 +0200 |
commit | eb10f250254a0153abd789e49a36945d996631a7 (patch) | |
tree | 5f7a0e290892f1137ccd28420991ef7981377cf6 /src/core/frontend/framebuffer_layout.h | |
parent | OpenGL: Remove unused RendererOpenGL fields (diff) | |
download | yuzu-eb10f250254a0153abd789e49a36945d996631a7.tar yuzu-eb10f250254a0153abd789e49a36945d996631a7.tar.gz yuzu-eb10f250254a0153abd789e49a36945d996631a7.tar.bz2 yuzu-eb10f250254a0153abd789e49a36945d996631a7.tar.lz yuzu-eb10f250254a0153abd789e49a36945d996631a7.tar.xz yuzu-eb10f250254a0153abd789e49a36945d996631a7.tar.zst yuzu-eb10f250254a0153abd789e49a36945d996631a7.zip |
Diffstat (limited to 'src/core/frontend/framebuffer_layout.h')
-rw-r--r-- | src/core/frontend/framebuffer_layout.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/core/frontend/framebuffer_layout.h b/src/core/frontend/framebuffer_layout.h index f1df5c55a..9a7738969 100644 --- a/src/core/frontend/framebuffer_layout.h +++ b/src/core/frontend/framebuffer_layout.h @@ -5,7 +5,9 @@ #pragma once #include "common/math_util.h" + namespace Layout { + /// Describes the layout of the window framebuffer (size and top/bottom screen positions) struct FramebufferLayout { unsigned width; @@ -14,6 +16,12 @@ struct FramebufferLayout { bool bottom_screen_enabled; MathUtil::Rectangle<unsigned> top_screen; MathUtil::Rectangle<unsigned> bottom_screen; + + /** + * Returns the ration of pixel size of the top screen, compared to the native size of the 3DS + * screen. + */ + float GetScalingRatio() const; }; /** @@ -52,4 +60,5 @@ FramebufferLayout LargeFrameLayout(unsigned width, unsigned height, bool is_swap * @return Newly created FramebufferLayout object with default screen regions initialized */ FramebufferLayout CustomFrameLayout(unsigned width, unsigned height); -} + +} // namespace Layout |