diff options
| author | 2016-05-03 00:07:17 -0600 | |
|---|---|---|
| committer | 2016-11-05 02:55:41 -0600 | |
| commit | 2b1654ad9bbd8af53f22434d350704a1a1d0a285 (patch) | |
| tree | 0da3cc7a1c622c1a659f4b2a8c5c08984dabd5c3 /src/common/framebuffer_layout.h | |
| parent | Update CONTRIBUTING.md (diff) | |
| download | yuzu-2b1654ad9bbd8af53f22434d350704a1a1d0a285.tar.gz yuzu-2b1654ad9bbd8af53f22434d350704a1a1d0a285.tar.xz yuzu-2b1654ad9bbd8af53f22434d350704a1a1d0a285.zip | |
Support additional screen layouts.
Allows users to choose a single screen layout or a large screen layout.
Adds a configuration option to change the prominent screen.
Diffstat (limited to 'src/common/framebuffer_layout.h')
| -rw-r--r-- | src/common/framebuffer_layout.h | 43 |
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" | ||
| 8 | namespace Layout { | ||
| 9 | /// Describes the layout of the window framebuffer (size and top/bottom screen positions) | ||
| 10 | struct 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 | */ | ||
| 25 | FramebufferLayout 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 | */ | ||
| 33 | FramebufferLayout 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 | */ | ||
| 42 | FramebufferLayout LargeFrameLayout(unsigned width, unsigned height, bool is_swapped); | ||
| 43 | } \ No newline at end of file | ||