Updated custom layout value names to be more accurate

This commit is contained in:
OpenSauce04 2024-05-26 21:17:37 +01:00 committed by OpenSauce
parent e74d7c65fb
commit 1d04033029
9 changed files with 104 additions and 104 deletions

View File

@ -174,14 +174,14 @@ void Config::ReadValues() {
Settings::values.layout_option = static_cast<Settings::LayoutOption>(sdl2_config->GetInteger( Settings::values.layout_option = static_cast<Settings::LayoutOption>(sdl2_config->GetInteger(
"Layout", "layout_option", static_cast<int>(Settings::LayoutOption::MobileLandscape))); "Layout", "layout_option", static_cast<int>(Settings::LayoutOption::MobileLandscape)));
ReadSetting("Layout", Settings::values.custom_layout); ReadSetting("Layout", Settings::values.custom_layout);
ReadSetting("Layout", Settings::values.custom_top_left); ReadSetting("Layout", Settings::values.custom_top_x);
ReadSetting("Layout", Settings::values.custom_top_top); ReadSetting("Layout", Settings::values.custom_top_y);
ReadSetting("Layout", Settings::values.custom_top_right); ReadSetting("Layout", Settings::values.custom_top_width);
ReadSetting("Layout", Settings::values.custom_top_bottom); ReadSetting("Layout", Settings::values.custom_top_height);
ReadSetting("Layout", Settings::values.custom_bottom_left); ReadSetting("Layout", Settings::values.custom_bottom_x);
ReadSetting("Layout", Settings::values.custom_bottom_top); ReadSetting("Layout", Settings::values.custom_bottom_y);
ReadSetting("Layout", Settings::values.custom_bottom_right); ReadSetting("Layout", Settings::values.custom_bottom_width);
ReadSetting("Layout", Settings::values.custom_bottom_bottom); ReadSetting("Layout", Settings::values.custom_bottom_height);
ReadSetting("Layout", Settings::values.cardboard_screen_size); ReadSetting("Layout", Settings::values.cardboard_screen_size);
ReadSetting("Layout", Settings::values.cardboard_x_shift); ReadSetting("Layout", Settings::values.cardboard_x_shift);
ReadSetting("Layout", Settings::values.cardboard_y_shift); ReadSetting("Layout", Settings::values.cardboard_y_shift);

View File

@ -186,14 +186,14 @@ custom_layout =
# Screen placement when using Custom layout option # Screen placement when using Custom layout option
# 0x, 0y is the top left corner of the render window. # 0x, 0y is the top left corner of the render window.
custom_top_left = custom_top_x =
custom_top_top = custom_top_y =
custom_top_right = custom_top_width =
custom_top_bottom = custom_top_height =
custom_bottom_left = custom_bottom_x =
custom_bottom_top = custom_bottom_y =
custom_bottom_right = custom_bottom_width =
custom_bottom_bottom = custom_bottom_height =
# Swaps the prominent screen with the other screen. # Swaps the prominent screen with the other screen.
# For example, if Single Screen is chosen, setting this to 1 will display the bottom screen instead of the top screen. # For example, if Single Screen is chosen, setting this to 1 will display the bottom screen instead of the top screen.

View File

@ -486,14 +486,14 @@ struct Values {
SwitchableSetting<float, true> large_screen_proportion{4.f, 1.f, 16.f, SwitchableSetting<float, true> large_screen_proportion{4.f, 1.f, 16.f,
"large_screen_proportion"}; "large_screen_proportion"};
Setting<bool> custom_layout{false, "custom_layout"}; Setting<bool> custom_layout{false, "custom_layout"};
Setting<u16> custom_top_left{0, "custom_top_left"}; Setting<u16> custom_top_x{0, "custom_top_x"};
Setting<u16> custom_top_top{0, "custom_top_top"}; Setting<u16> custom_top_y{0, "custom_top_y"};
Setting<u16> custom_top_right{400, "custom_top_right"}; Setting<u16> custom_top_width{400, "custom_top_width"};
Setting<u16> custom_top_bottom{240, "custom_top_bottom"}; Setting<u16> custom_top_height{240, "custom_top_height"};
Setting<u16> custom_bottom_left{40, "custom_bottom_left"}; Setting<u16> custom_bottom_x{40, "custom_bottom_x"};
Setting<u16> custom_bottom_top{240, "custom_bottom_top"}; Setting<u16> custom_bottom_y{240, "custom_bottom_y"};
Setting<u16> custom_bottom_right{360, "custom_bottom_right"}; Setting<u16> custom_bottom_width{360, "custom_bottom_width"};
Setting<u16> custom_bottom_bottom{480, "custom_bottom_bottom"}; Setting<u16> custom_bottom_height{480, "custom_bottom_height"};
Setting<u16> custom_second_layer_opacity{100, "custom_second_layer_opacity"}; Setting<u16> custom_second_layer_opacity{100, "custom_second_layer_opacity"};
SwitchableSetting<float> bg_red{0.f, "bg_red"}; SwitchableSetting<float> bg_red{0.f, "bg_red"};

View File

@ -377,18 +377,18 @@ FramebufferLayout CustomFrameLayout(u32 width, u32 height, bool is_swapped) {
FramebufferLayout res{width, height, true, true, {}, {}, !Settings::values.upright_screen}; FramebufferLayout res{width, height, true, true, {}, {}, !Settings::values.upright_screen};
Common::Rectangle<u32> top_screen{Settings::values.custom_top_left.GetValue(), Common::Rectangle<u32> top_screen{Settings::values.custom_top_x.GetValue(),
Settings::values.custom_top_top.GetValue(), Settings::values.custom_top_y.GetValue(),
(u32)(Settings::values.custom_top_left.GetValue() + (u32)(Settings::values.custom_top_x.GetValue() +
Settings::values.custom_top_right.GetValue()), Settings::values.custom_top_width.GetValue()),
(u32)(Settings::values.custom_top_top.GetValue() + (u32)(Settings::values.custom_top_y.GetValue() +
Settings::values.custom_top_bottom.GetValue())}; Settings::values.custom_top_height.GetValue())};
Common::Rectangle<u32> bot_screen{Settings::values.custom_bottom_left.GetValue(), Common::Rectangle<u32> bot_screen{Settings::values.custom_bottom_x.GetValue(),
Settings::values.custom_bottom_top.GetValue(), Settings::values.custom_bottom_y.GetValue(),
(u32)(Settings::values.custom_bottom_left.GetValue() + (u32)(Settings::values.custom_bottom_x.GetValue() +
Settings::values.custom_bottom_right.GetValue()), Settings::values.custom_bottom_width.GetValue()),
(u32)(Settings::values.custom_bottom_top.GetValue() + (u32)(Settings::values.custom_bottom_y.GetValue() +
Settings::values.custom_bottom_bottom.GetValue())}; Settings::values.custom_bottom_height.GetValue())};
if (is_swapped) { if (is_swapped) {
res.top_screen = bot_screen; res.top_screen = bot_screen;
@ -402,10 +402,10 @@ FramebufferLayout CustomFrameLayout(u32 width, u32 height, bool is_swapped) {
FramebufferLayout FrameLayoutFromResolutionScale(u32 res_scale, bool is_secondary) { FramebufferLayout FrameLayoutFromResolutionScale(u32 res_scale, bool is_secondary) {
if (Settings::values.custom_layout.GetValue() == true) { if (Settings::values.custom_layout.GetValue() == true) {
return CustomFrameLayout(std::max(Settings::values.custom_top_right.GetValue(), return CustomFrameLayout(std::max(Settings::values.custom_top_width.GetValue(),
Settings::values.custom_bottom_right.GetValue()), Settings::values.custom_bottom_width.GetValue()),
std::max(Settings::values.custom_top_bottom.GetValue(), std::max(Settings::values.custom_top_height.GetValue(),
Settings::values.custom_bottom_bottom.GetValue()), Settings::values.custom_bottom_height.GetValue()),
Settings::values.swap_screen.GetValue()); Settings::values.swap_screen.GetValue());
} }

View File

@ -165,14 +165,14 @@ void Config::ReadValues() {
ReadSetting("Layout", Settings::values.upright_screen); ReadSetting("Layout", Settings::values.upright_screen);
ReadSetting("Layout", Settings::values.large_screen_proportion); ReadSetting("Layout", Settings::values.large_screen_proportion);
ReadSetting("Layout", Settings::values.custom_layout); ReadSetting("Layout", Settings::values.custom_layout);
ReadSetting("Layout", Settings::values.custom_top_left); ReadSetting("Layout", Settings::values.custom_top_x);
ReadSetting("Layout", Settings::values.custom_top_top); ReadSetting("Layout", Settings::values.custom_top_y);
ReadSetting("Layout", Settings::values.custom_top_right); ReadSetting("Layout", Settings::values.custom_top_width);
ReadSetting("Layout", Settings::values.custom_top_bottom); ReadSetting("Layout", Settings::values.custom_top_height);
ReadSetting("Layout", Settings::values.custom_bottom_left); ReadSetting("Layout", Settings::values.custom_bottom_x);
ReadSetting("Layout", Settings::values.custom_bottom_top); ReadSetting("Layout", Settings::values.custom_bottom_y);
ReadSetting("Layout", Settings::values.custom_bottom_right); ReadSetting("Layout", Settings::values.custom_bottom_width);
ReadSetting("Layout", Settings::values.custom_bottom_bottom); ReadSetting("Layout", Settings::values.custom_bottom_height);
ReadSetting("Layout", Settings::values.custom_second_layer_opacity); ReadSetting("Layout", Settings::values.custom_second_layer_opacity);
// Utility // Utility

View File

@ -197,14 +197,14 @@ custom_layout =
# Screen placement when using Custom layout option # Screen placement when using Custom layout option
# 0x, 0y is the top left corner of the render window. # 0x, 0y is the top left corner of the render window.
custom_top_left = custom_top_x =
custom_top_top = custom_top_y =
custom_top_right = custom_top_width =
custom_top_bottom = custom_top_height =
custom_bottom_left = custom_bottom_x =
custom_bottom_top = custom_bottom_y =
custom_bottom_right = custom_bottom_width =
custom_bottom_bottom = custom_bottom_height =
# Opacity of second layer when using custom layout option (bottom screen unless swapped) # Opacity of second layer when using custom layout option (bottom screen unless swapped)
custom_second_layer_opacity = custom_second_layer_opacity =

View File

@ -519,14 +519,14 @@ void Config::ReadLayoutValues() {
if (global) { if (global) {
ReadBasicSetting(Settings::values.mono_render_option); ReadBasicSetting(Settings::values.mono_render_option);
ReadBasicSetting(Settings::values.custom_layout); ReadBasicSetting(Settings::values.custom_layout);
ReadBasicSetting(Settings::values.custom_top_left); ReadBasicSetting(Settings::values.custom_top_x);
ReadBasicSetting(Settings::values.custom_top_top); ReadBasicSetting(Settings::values.custom_top_y);
ReadBasicSetting(Settings::values.custom_top_right); ReadBasicSetting(Settings::values.custom_top_width);
ReadBasicSetting(Settings::values.custom_top_bottom); ReadBasicSetting(Settings::values.custom_top_height);
ReadBasicSetting(Settings::values.custom_bottom_left); ReadBasicSetting(Settings::values.custom_bottom_x);
ReadBasicSetting(Settings::values.custom_bottom_top); ReadBasicSetting(Settings::values.custom_bottom_y);
ReadBasicSetting(Settings::values.custom_bottom_right); ReadBasicSetting(Settings::values.custom_bottom_width);
ReadBasicSetting(Settings::values.custom_bottom_bottom); ReadBasicSetting(Settings::values.custom_bottom_height);
ReadBasicSetting(Settings::values.custom_second_layer_opacity); ReadBasicSetting(Settings::values.custom_second_layer_opacity);
} }
@ -1061,14 +1061,14 @@ void Config::SaveLayoutValues() {
if (global) { if (global) {
WriteBasicSetting(Settings::values.mono_render_option); WriteBasicSetting(Settings::values.mono_render_option);
WriteBasicSetting(Settings::values.custom_layout); WriteBasicSetting(Settings::values.custom_layout);
WriteBasicSetting(Settings::values.custom_top_left); WriteBasicSetting(Settings::values.custom_top_x);
WriteBasicSetting(Settings::values.custom_top_top); WriteBasicSetting(Settings::values.custom_top_y);
WriteBasicSetting(Settings::values.custom_top_right); WriteBasicSetting(Settings::values.custom_top_width);
WriteBasicSetting(Settings::values.custom_top_bottom); WriteBasicSetting(Settings::values.custom_top_height);
WriteBasicSetting(Settings::values.custom_bottom_left); WriteBasicSetting(Settings::values.custom_bottom_x);
WriteBasicSetting(Settings::values.custom_bottom_top); WriteBasicSetting(Settings::values.custom_bottom_y);
WriteBasicSetting(Settings::values.custom_bottom_right); WriteBasicSetting(Settings::values.custom_bottom_width);
WriteBasicSetting(Settings::values.custom_bottom_bottom); WriteBasicSetting(Settings::values.custom_bottom_height);
WriteBasicSetting(Settings::values.custom_second_layer_opacity); WriteBasicSetting(Settings::values.custom_second_layer_opacity);
} }

View File

@ -56,14 +56,14 @@ void ConfigureLayout::SetConfiguration() {
ui->toggle_swap_screen->setChecked(Settings::values.swap_screen.GetValue()); ui->toggle_swap_screen->setChecked(Settings::values.swap_screen.GetValue());
ui->toggle_upright_screen->setChecked(Settings::values.upright_screen.GetValue()); ui->toggle_upright_screen->setChecked(Settings::values.upright_screen.GetValue());
ui->large_screen_proportion->setValue(Settings::values.large_screen_proportion.GetValue()); ui->large_screen_proportion->setValue(Settings::values.large_screen_proportion.GetValue());
ui->custom_top_left->setValue(Settings::values.custom_top_left.GetValue()); ui->custom_top_x->setValue(Settings::values.custom_top_x.GetValue());
ui->custom_top_top->setValue(Settings::values.custom_top_top.GetValue()); ui->custom_top_y->setValue(Settings::values.custom_top_y.GetValue());
ui->custom_top_right->setValue(Settings::values.custom_top_right.GetValue()); ui->custom_top_width->setValue(Settings::values.custom_top_width.GetValue());
ui->custom_top_bottom->setValue(Settings::values.custom_top_bottom.GetValue()); ui->custom_top_height->setValue(Settings::values.custom_top_height.GetValue());
ui->custom_bottom_left->setValue(Settings::values.custom_bottom_left.GetValue()); ui->custom_bottom_x->setValue(Settings::values.custom_bottom_x.GetValue());
ui->custom_bottom_top->setValue(Settings::values.custom_bottom_top.GetValue()); ui->custom_bottom_y->setValue(Settings::values.custom_bottom_y.GetValue());
ui->custom_bottom_right->setValue(Settings::values.custom_bottom_right.GetValue()); ui->custom_bottom_width->setValue(Settings::values.custom_bottom_width.GetValue());
ui->custom_bottom_bottom->setValue(Settings::values.custom_bottom_bottom.GetValue()); ui->custom_bottom_height->setValue(Settings::values.custom_bottom_height.GetValue());
ui->custom_second_layer_opacity->setValue( ui->custom_second_layer_opacity->setValue(
Settings::values.custom_second_layer_opacity.GetValue()); Settings::values.custom_second_layer_opacity.GetValue());
bg_color = bg_color =
@ -82,14 +82,14 @@ void ConfigureLayout::RetranslateUI() {
void ConfigureLayout::ApplyConfiguration() { void ConfigureLayout::ApplyConfiguration() {
Settings::values.large_screen_proportion = ui->large_screen_proportion->value(); Settings::values.large_screen_proportion = ui->large_screen_proportion->value();
Settings::values.custom_top_left = ui->custom_top_left->value(); Settings::values.custom_top_x = ui->custom_top_x->value();
Settings::values.custom_top_top = ui->custom_top_top->value(); Settings::values.custom_top_y = ui->custom_top_y->value();
Settings::values.custom_top_right = ui->custom_top_right->value(); Settings::values.custom_top_width = ui->custom_top_width->value();
Settings::values.custom_top_bottom = ui->custom_top_bottom->value(); Settings::values.custom_top_height = ui->custom_top_height->value();
Settings::values.custom_bottom_left = ui->custom_bottom_left->value(); Settings::values.custom_bottom_x = ui->custom_bottom_x->value();
Settings::values.custom_bottom_top = ui->custom_bottom_top->value(); Settings::values.custom_bottom_y = ui->custom_bottom_y->value();
Settings::values.custom_bottom_right = ui->custom_bottom_right->value(); Settings::values.custom_bottom_width = ui->custom_bottom_width->value();
Settings::values.custom_bottom_bottom = ui->custom_bottom_bottom->value(); Settings::values.custom_bottom_height = ui->custom_bottom_height->value();
Settings::values.custom_second_layer_opacity = ui->custom_second_layer_opacity->value(); Settings::values.custom_second_layer_opacity = ui->custom_second_layer_opacity->value();
ConfigurationShared::ApplyPerGameSetting(&Settings::values.layout_option, ui->layout_combobox); ConfigurationShared::ApplyPerGameSetting(&Settings::values.layout_option, ui->layout_combobox);

View File

@ -198,14 +198,14 @@
</property> </property>
<layout class="QGridLayout" name="gridLayout_2"> <layout class="QGridLayout" name="gridLayout_2">
<item row="0" column="0"> <item row="0" column="0">
<widget class="QLabel" name="lb_top_left"> <widget class="QLabel" name="lb_top_x">
<property name="text"> <property name="text">
<string>X Position</string> <string>X Position</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="0" column="1"> <item row="0" column="1">
<widget class="QSpinBox" name="custom_top_left"> <widget class="QSpinBox" name="custom_top_x">
<property name="buttonSymbols"> <property name="buttonSymbols">
<enum>QAbstractSpinBox::NoButtons</enum> <enum>QAbstractSpinBox::NoButtons</enum>
</property> </property>
@ -215,14 +215,14 @@
</widget> </widget>
</item> </item>
<item row="1" column="0"> <item row="1" column="0">
<widget class="QLabel" name="lb_top_top"> <widget class="QLabel" name="lb_top_y">
<property name="text"> <property name="text">
<string>Y Position</string> <string>Y Position</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="1" column="1"> <item row="1" column="1">
<widget class="QSpinBox" name="custom_top_top"> <widget class="QSpinBox" name="custom_top_y">
<property name="buttonSymbols"> <property name="buttonSymbols">
<enum>QAbstractSpinBox::NoButtons</enum> <enum>QAbstractSpinBox::NoButtons</enum>
</property> </property>
@ -232,14 +232,14 @@
</widget> </widget>
</item> </item>
<item row="2" column="0"> <item row="2" column="0">
<widget class="QLabel" name="lb_top_right"> <widget class="QLabel" name="lb_top_width">
<property name="text"> <property name="text">
<string>Width</string> <string>Width</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="2" column="1"> <item row="2" column="1">
<widget class="QSpinBox" name="custom_top_right"> <widget class="QSpinBox" name="custom_top_width">
<property name="buttonSymbols"> <property name="buttonSymbols">
<enum>QAbstractSpinBox::NoButtons</enum> <enum>QAbstractSpinBox::NoButtons</enum>
</property> </property>
@ -249,14 +249,14 @@
</widget> </widget>
</item> </item>
<item row="3" column="0"> <item row="3" column="0">
<widget class="QLabel" name="lb_top_bottom"> <widget class="QLabel" name="lb_top_height">
<property name="text"> <property name="text">
<string>Height</string> <string>Height</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="3" column="1"> <item row="3" column="1">
<widget class="QSpinBox" name="custom_top_bottom"> <widget class="QSpinBox" name="custom_top_height">
<property name="buttonSymbols"> <property name="buttonSymbols">
<enum>QAbstractSpinBox::NoButtons</enum> <enum>QAbstractSpinBox::NoButtons</enum>
</property> </property>
@ -281,14 +281,14 @@
</property> </property>
<layout class="QGridLayout" name="gridLayout"> <layout class="QGridLayout" name="gridLayout">
<item row="0" column="0"> <item row="0" column="0">
<widget class="QLabel" name="lb_bottom_left"> <widget class="QLabel" name="lb_bottom_x">
<property name="text"> <property name="text">
<string>X Position</string> <string>X Position</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="0" column="1"> <item row="0" column="1">
<widget class="QSpinBox" name="custom_bottom_left"> <widget class="QSpinBox" name="custom_bottom_x">
<property name="buttonSymbols"> <property name="buttonSymbols">
<enum>QAbstractSpinBox::NoButtons</enum> <enum>QAbstractSpinBox::NoButtons</enum>
</property> </property>
@ -298,14 +298,14 @@
</widget> </widget>
</item> </item>
<item row="1" column="0"> <item row="1" column="0">
<widget class="QLabel" name="lb_bottom_top"> <widget class="QLabel" name="lb_bottom_y">
<property name="text"> <property name="text">
<string>Y Position</string> <string>Y Position</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="1" column="1"> <item row="1" column="1">
<widget class="QSpinBox" name="custom_bottom_top"> <widget class="QSpinBox" name="custom_bottom_y">
<property name="buttonSymbols"> <property name="buttonSymbols">
<enum>QAbstractSpinBox::NoButtons</enum> <enum>QAbstractSpinBox::NoButtons</enum>
</property> </property>
@ -315,14 +315,14 @@
</widget> </widget>
</item> </item>
<item row="2" column="0"> <item row="2" column="0">
<widget class="QLabel" name="lb_bottom_right"> <widget class="QLabel" name="lb_bottom_width">
<property name="text"> <property name="text">
<string>Width</string> <string>Width</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="2" column="1"> <item row="2" column="1">
<widget class="QSpinBox" name="custom_bottom_right"> <widget class="QSpinBox" name="custom_bottom_width">
<property name="buttonSymbols"> <property name="buttonSymbols">
<enum>QAbstractSpinBox::NoButtons</enum> <enum>QAbstractSpinBox::NoButtons</enum>
</property> </property>
@ -332,14 +332,14 @@
</widget> </widget>
</item> </item>
<item row="3" column="0"> <item row="3" column="0">
<widget class="QLabel" name="lb_bottom_bottom"> <widget class="QLabel" name="lb_bottom_height">
<property name="text"> <property name="text">
<string>Height</string> <string>Height</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="3" column="1"> <item row="3" column="1">
<widget class="QSpinBox" name="custom_bottom_bottom"> <widget class="QSpinBox" name="custom_bottom_height">
<property name="buttonSymbols"> <property name="buttonSymbols">
<enum>QAbstractSpinBox::NoButtons</enum> <enum>QAbstractSpinBox::NoButtons</enum>
</property> </property>