summaryrefslogtreecommitdiff
path: root/src/core/frontend/framebuffer_layout.h
diff options
context:
space:
mode:
authorGravatar Yuri Kunde Schlesner2017-05-27 18:06:59 -0700
committerGravatar Yuri Kunde Schlesner2017-05-27 18:41:24 -0700
commiteb10f250254a0153abd789e49a36945d996631a7 (patch)
tree5f7a0e290892f1137ccd28420991ef7981377cf6 /src/core/frontend/framebuffer_layout.h
parentOpenGL: Remove unused RendererOpenGL fields (diff)
downloadyuzu-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.h11
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
8namespace Layout { 9namespace 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)
10struct FramebufferLayout { 12struct 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 */
54FramebufferLayout CustomFrameLayout(unsigned width, unsigned height); 62FramebufferLayout CustomFrameLayout(unsigned width, unsigned height);
55} 63
64} // namespace Layout