summaryrefslogtreecommitdiffstats
path: root/src/common/framebuffer_layout.h
diff options
context:
space:
mode:
authorJames Rowe <jroweboy@gmail.com>2016-05-03 08:07:17 +0200
committerJames Rowe <jroweboy@gmail.com>2016-11-05 09:55:41 +0100
commit2b1654ad9bbd8af53f22434d350704a1a1d0a285 (patch)
tree0da3cc7a1c622c1a659f4b2a8c5c08984dabd5c3 /src/common/framebuffer_layout.h
parentUpdate CONTRIBUTING.md (diff)
downloadyuzu-2b1654ad9bbd8af53f22434d350704a1a1d0a285.tar
yuzu-2b1654ad9bbd8af53f22434d350704a1a1d0a285.tar.gz
yuzu-2b1654ad9bbd8af53f22434d350704a1a1d0a285.tar.bz2
yuzu-2b1654ad9bbd8af53f22434d350704a1a1d0a285.tar.lz
yuzu-2b1654ad9bbd8af53f22434d350704a1a1d0a285.tar.xz
yuzu-2b1654ad9bbd8af53f22434d350704a1a1d0a285.tar.zst
yuzu-2b1654ad9bbd8af53f22434d350704a1a1d0a285.zip
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 @@
+// Copyright 2016 Citra Emulator Project
+// Licensed under GPLv2 or any later version
+// Refer to the license.txt file included.
+
+#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;
+ unsigned height;
+ bool top_screen_enabled;
+ bool bottom_screen_enabled;
+ MathUtil::Rectangle<unsigned> top_screen;
+ MathUtil::Rectangle<unsigned> bottom_screen;
+};
+
+/**
+ * Factory method for constructing a default FramebufferLayout
+ * @param width Window framebuffer width in pixels
+ * @param height Window framebuffer height in pixels
+ * @return Newly created FramebufferLayout object with default screen regions initialized
+ */
+FramebufferLayout DefaultFrameLayout(unsigned width, unsigned height, bool is_swapped);
+
+/**
+ * Factory method for constructing a FramebufferLayout with only the top screen
+ * @param width Window framebuffer width in pixels
+ * @param height Window framebuffer height in pixels
+ * @return Newly created FramebufferLayout object with default screen regions initialized
+ */
+FramebufferLayout SingleFrameLayout(unsigned width, unsigned height, bool is_swapped);
+
+/**
+ * Factory method for constructing a Frame with the a 4x size Top screen with a 1x size bottom screen on the right
+ * This is useful in particular because it matches well with a 1920x1080 resolution monitor
+ * @param width Window framebuffer width in pixels
+ * @param height Window framebuffer height in pixels
+ * @return Newly created FramebufferLayout object with default screen regions initialized
+ */
+FramebufferLayout LargeFrameLayout(unsigned width, unsigned height, bool is_swapped);
+} \ No newline at end of file