diff options
| author | 2017-05-27 18:06:59 -0700 | |
|---|---|---|
| committer | 2017-05-27 18:41:24 -0700 | |
| commit | eb10f250254a0153abd789e49a36945d996631a7 (patch) | |
| tree | 5f7a0e290892f1137ccd28420991ef7981377cf6 /src/core/frontend/framebuffer_layout.h | |
| parent | OpenGL: Remove unused RendererOpenGL fields (diff) | |
| download | yuzu-eb10f250254a0153abd789e49a36945d996631a7.tar.gz yuzu-eb10f250254a0153abd789e49a36945d996631a7.tar.xz yuzu-eb10f250254a0153abd789e49a36945d996631a7.zip | |
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 @@ | |||
| 5 | #pragma once | 5 | #pragma once |
| 6 | 6 | ||
| 7 | #include "common/math_util.h" | 7 | #include "common/math_util.h" |
| 8 | |||
| 8 | namespace Layout { | 9 | namespace Layout { |
| 10 | |||
| 9 | /// Describes the layout of the window framebuffer (size and top/bottom screen positions) | 11 | /// Describes the layout of the window framebuffer (size and top/bottom screen positions) |
| 10 | struct FramebufferLayout { | 12 | struct FramebufferLayout { |
| 11 | unsigned width; | 13 | unsigned width; |
| @@ -14,6 +16,12 @@ struct FramebufferLayout { | |||
| 14 | bool bottom_screen_enabled; | 16 | bool bottom_screen_enabled; |
| 15 | MathUtil::Rectangle<unsigned> top_screen; | 17 | MathUtil::Rectangle<unsigned> top_screen; |
| 16 | MathUtil::Rectangle<unsigned> bottom_screen; | 18 | MathUtil::Rectangle<unsigned> bottom_screen; |
| 19 | |||
| 20 | /** | ||
| 21 | * Returns the ration of pixel size of the top screen, compared to the native size of the 3DS | ||
| 22 | * screen. | ||
| 23 | */ | ||
| 24 | float GetScalingRatio() const; | ||
| 17 | }; | 25 | }; |
| 18 | 26 | ||
| 19 | /** | 27 | /** |
| @@ -52,4 +60,5 @@ FramebufferLayout LargeFrameLayout(unsigned width, unsigned height, bool is_swap | |||
| 52 | * @return Newly created FramebufferLayout object with default screen regions initialized | 60 | * @return Newly created FramebufferLayout object with default screen regions initialized |
| 53 | */ | 61 | */ |
| 54 | FramebufferLayout CustomFrameLayout(unsigned width, unsigned height); | 62 | FramebufferLayout CustomFrameLayout(unsigned width, unsigned height); |
| 55 | } | 63 | |
| 64 | } // namespace Layout | ||