mirror of
https://git.suyu.dev/suyu/suyu.git
synced 2024-11-24 12:26:26 -05:00
3cdf854e44
* added a SidebySide Layout * Reworked, so both screen have the same height and cleaned up screen translates. * added the option in the UI, hope this is the right way to do it. formated framebuffer_layout.cpp * delete the x64 files * deleted ui_configure_graphics.h * added Option for the Layout in the xml * got rid of SIDE_BY_SIDE_ASPECT_RATIO because it was useless. pulled translate into variables * changed shift variables to u32 and moved them in their respective branch. remove notr="true" for the Screen layout drop down * reworked intends :). changed function description for SideFrameLayout * some description reworking
75 lines
3 KiB
C++
75 lines
3 KiB
C++
// 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;
|
|
|
|
/**
|
|
* Returns the ration of pixel size of the top screen, compared to the native size of the 3DS
|
|
* screen.
|
|
*/
|
|
float GetScalingRatio() const;
|
|
};
|
|
|
|
/**
|
|
* Factory method for constructing a default FramebufferLayout
|
|
* @param width Window framebuffer width in pixels
|
|
* @param height Window framebuffer height in pixels
|
|
* @param is_swapped if true, the bottom screen will be displayed above the top screen
|
|
* @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 or bottom screen
|
|
* @param width Window framebuffer width in pixels
|
|
* @param height Window framebuffer height in pixels
|
|
* @param is_swapped if true, the bottom screen will be displayed (and the top won't be displayed)
|
|
* @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
|
|
* @param is_swapped if true, the bottom screen will be the large display
|
|
* @return Newly created FramebufferLayout object with default screen regions initialized
|
|
*/
|
|
FramebufferLayout LargeFrameLayout(unsigned width, unsigned height, bool is_swapped);
|
|
|
|
/**
|
|
* Factory method for constructing a Frame with the Top screen and bottom
|
|
* screen side by side
|
|
* This is useful for devices with small screens, like the GPDWin
|
|
* @param width Window framebuffer width in pixels
|
|
* @param height Window framebuffer height in pixels
|
|
* @param is_swapped if true, the bottom screen will be the left display
|
|
* @return Newly created FramebufferLayout object with default screen regions initialized
|
|
*/
|
|
FramebufferLayout SideFrameLayout(unsigned width, unsigned height, bool is_swapped);
|
|
|
|
/**
|
|
* Factory method for constructing a custom 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 CustomFrameLayout(unsigned width, unsigned height);
|
|
|
|
} // namespace Layout
|