diff options
| author | Yuri Kunde Schlesner <yuriks@yuriks.net> | 2017-05-27 18:06:59 -0700 |
|---|---|---|
| committer | Yuri Kunde Schlesner <yuriks@yuriks.net> | 2017-05-27 18:41:24 -0700 |
| commit | eb10f250254a0153abd789e49a36945d996631a7 (patch) | |
| tree | 5f7a0e290892f1137ccd28420991ef7981377cf6 /src/core/frontend/framebuffer_layout.h | |
| parent | 6665557ff76cf8a04c025da90cad49dbe02d808d (diff) | |
Move screen size constants from video_core to core
video_core didn't even properly use them, and they were the source of
many otherwise-unnecessary dependencies from core to video_core.
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 |
