summaryrefslogtreecommitdiff
path: root/src/common/framebuffer_layout.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/common/framebuffer_layout.h')
-rw-r--r--src/common/framebuffer_layout.h43
1 files changed, 43 insertions, 0 deletions
diff --git a/src/common/framebuffer_layout.h b/src/common/framebuffer_layout.h
new file mode 100644
index 000000000..c69a80732
--- /dev/null
+++ b/src/common/framebuffer_layout.h
@@ -0,0 +1,43 @@
1// Copyright 2016 Citra Emulator Project
2// Licensed under GPLv2 or any later version
3// Refer to the license.txt file included.
4
5#pragma once
6
7#include "common/math_util.h"
8namespace Layout {
9/// Describes the layout of the window framebuffer (size and top/bottom screen positions)
10struct FramebufferLayout {
11 unsigned width;
12 unsigned height;
13 bool top_screen_enabled;
14 bool bottom_screen_enabled;
15 MathUtil::Rectangle<unsigned> top_screen;
16 MathUtil::Rectangle<unsigned> bottom_screen;
17};
18
19/**
20 * Factory method for constructing a default FramebufferLayout
21 * @param width Window framebuffer width in pixels
22 * @param height Window framebuffer height in pixels
23 * @return Newly created FramebufferLayout object with default screen regions initialized
24 */
25FramebufferLayout DefaultFrameLayout(unsigned width, unsigned height, bool is_swapped);
26
27/**
28 * Factory method for constructing a FramebufferLayout with only the top screen
29 * @param width Window framebuffer width in pixels
30 * @param height Window framebuffer height in pixels
31 * @return Newly created FramebufferLayout object with default screen regions initialized
32 */
33FramebufferLayout SingleFrameLayout(unsigned width, unsigned height, bool is_swapped);
34
35/**
36 * Factory method for constructing a Frame with the a 4x size Top screen with a 1x size bottom screen on the right
37 * This is useful in particular because it matches well with a 1920x1080 resolution monitor
38 * @param width Window framebuffer width in pixels
39 * @param height Window framebuffer height in pixels
40 * @return Newly created FramebufferLayout object with default screen regions initialized
41 */
42FramebufferLayout LargeFrameLayout(unsigned width, unsigned height, bool is_swapped);
43} \ No newline at end of file