Add custom layout settings.
This commit is contained in:
parent
ac4ea522cb
commit
e0a4450bbd
9 changed files with 104 additions and 13 deletions
|
@ -116,17 +116,21 @@ void EmuWindow::GyroscopeChanged(float x, float y, float z) {
|
|||
|
||||
void EmuWindow::UpdateCurrentFramebufferLayout(unsigned width, unsigned height) {
|
||||
Layout::FramebufferLayout layout;
|
||||
switch (Settings::values.layout_option) {
|
||||
case Settings::LayoutOption::SingleScreen:
|
||||
layout = Layout::SingleFrameLayout(width, height, Settings::values.swap_screen);
|
||||
break;
|
||||
case Settings::LayoutOption::LargeScreen:
|
||||
layout = Layout::LargeFrameLayout(width, height, Settings::values.swap_screen);
|
||||
break;
|
||||
case Settings::LayoutOption::Default:
|
||||
default:
|
||||
layout = Layout::DefaultFrameLayout(width, height, Settings::values.swap_screen);
|
||||
break;
|
||||
if (Settings::values.custom_layout == true) {
|
||||
layout = Layout::CustomFrameLayout(width, height);
|
||||
} else {
|
||||
switch (Settings::values.layout_option) {
|
||||
case Settings::LayoutOption::SingleScreen:
|
||||
layout = Layout::SingleFrameLayout(width, height, Settings::values.swap_screen);
|
||||
break;
|
||||
case Settings::LayoutOption::LargeScreen:
|
||||
layout = Layout::LargeFrameLayout(width, height, Settings::values.swap_screen);
|
||||
break;
|
||||
case Settings::LayoutOption::Default:
|
||||
default:
|
||||
layout = Layout::DefaultFrameLayout(width, height, Settings::values.swap_screen);
|
||||
break;
|
||||
}
|
||||
}
|
||||
NotifyFramebufferLayoutChanged(layout);
|
||||
}
|
||||
|
|
|
@ -14,7 +14,6 @@ enum class LayoutOption {
|
|||
Default,
|
||||
SingleScreen,
|
||||
LargeScreen,
|
||||
Custom,
|
||||
};
|
||||
|
||||
namespace NativeInput {
|
||||
|
@ -94,6 +93,15 @@ struct Values {
|
|||
|
||||
LayoutOption layout_option;
|
||||
bool swap_screen;
|
||||
bool custom_layout;
|
||||
u16 custom_top_left;
|
||||
u16 custom_top_top;
|
||||
u16 custom_top_right;
|
||||
u16 custom_top_bottom;
|
||||
u16 custom_bottom_left;
|
||||
u16 custom_bottom_top;
|
||||
u16 custom_bottom_right;
|
||||
u16 custom_bottom_bottom;
|
||||
|
||||
float bg_red;
|
||||
float bg_green;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue