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 | b868036561d102e28a4d2983e964a7b6d5dd2bf8 (patch) | |
| tree | 5f7a0e290892f1137ccd28420991ef7981377cf6 /src/core/frontend/framebuffer_layout.h | |
| parent | 2010024c2d212cb1f6d2c4c2990a9d374fa96a28 (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 f1df5c55af..9a7738969b 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 |
