diff options
Diffstat (limited to '')
-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 |