From e74d7c65fb60ebd5a84d162057c953d44f19f476 Mon Sep 17 00:00:00 2001 From: OpenSauce04 Date: Sun, 26 May 2024 21:10:57 +0100 Subject: [PATCH] Custom Layout options now uses X, Y, Width Height Previously used Left, Top, Right, Bottom positions --- src/core/frontend/framebuffer_layout.cpp | 12 +++-- src/lime_qt/configuration/configure_layout.ui | 48 +++++++++---------- 2 files changed, 32 insertions(+), 28 deletions(-) diff --git a/src/core/frontend/framebuffer_layout.cpp b/src/core/frontend/framebuffer_layout.cpp index 11d2249ac..481de040c 100644 --- a/src/core/frontend/framebuffer_layout.cpp +++ b/src/core/frontend/framebuffer_layout.cpp @@ -379,12 +379,16 @@ FramebufferLayout CustomFrameLayout(u32 width, u32 height, bool is_swapped) { Common::Rectangle top_screen{Settings::values.custom_top_left.GetValue(), Settings::values.custom_top_top.GetValue(), - Settings::values.custom_top_right.GetValue(), - Settings::values.custom_top_bottom.GetValue()}; + (u32)(Settings::values.custom_top_left.GetValue() + + Settings::values.custom_top_right.GetValue()), + (u32)(Settings::values.custom_top_top.GetValue() + + Settings::values.custom_top_bottom.GetValue())}; Common::Rectangle bot_screen{Settings::values.custom_bottom_left.GetValue(), Settings::values.custom_bottom_top.GetValue(), - Settings::values.custom_bottom_right.GetValue(), - Settings::values.custom_bottom_bottom.GetValue()}; + (u32)(Settings::values.custom_bottom_left.GetValue() + + Settings::values.custom_bottom_right.GetValue()), + (u32)(Settings::values.custom_bottom_top.GetValue() + + Settings::values.custom_bottom_bottom.GetValue())}; if (is_swapped) { res.top_screen = bot_screen; diff --git a/src/lime_qt/configuration/configure_layout.ui b/src/lime_qt/configuration/configure_layout.ui index 4f71443ec..09fa0f7c3 100644 --- a/src/lime_qt/configuration/configure_layout.ui +++ b/src/lime_qt/configuration/configure_layout.ui @@ -197,14 +197,14 @@ Top Screen - + - Left + X Position - + QAbstractSpinBox::NoButtons @@ -214,14 +214,14 @@ - + - Top + Y Position - + QAbstractSpinBox::NoButtons @@ -231,14 +231,14 @@ - + - Right + Width - + QAbstractSpinBox::NoButtons @@ -248,14 +248,14 @@ - + - Bottom + Height - + QAbstractSpinBox::NoButtons @@ -280,14 +280,14 @@ Bottom Screen - + - Left + X Position - + QAbstractSpinBox::NoButtons @@ -297,14 +297,14 @@ - + - Top + Y Position - + QAbstractSpinBox::NoButtons @@ -314,14 +314,14 @@ - + - Right + Width - + QAbstractSpinBox::NoButtons @@ -331,14 +331,14 @@ - + - Bottom + Height - + QAbstractSpinBox::NoButtons