diff --git a/src/android/app/src/main/jni/config.cpp b/src/android/app/src/main/jni/config.cpp index 941db7610..eff17d63e 100644 --- a/src/android/app/src/main/jni/config.cpp +++ b/src/android/app/src/main/jni/config.cpp @@ -174,14 +174,14 @@ void Config::ReadValues() { Settings::values.layout_option = static_cast(sdl2_config->GetInteger( "Layout", "layout_option", static_cast(Settings::LayoutOption::MobileLandscape))); ReadSetting("Layout", Settings::values.custom_layout); - ReadSetting("Layout", Settings::values.custom_top_left); - ReadSetting("Layout", Settings::values.custom_top_top); - ReadSetting("Layout", Settings::values.custom_top_right); - ReadSetting("Layout", Settings::values.custom_top_bottom); - ReadSetting("Layout", Settings::values.custom_bottom_left); - ReadSetting("Layout", Settings::values.custom_bottom_top); - ReadSetting("Layout", Settings::values.custom_bottom_right); - ReadSetting("Layout", Settings::values.custom_bottom_bottom); + ReadSetting("Layout", Settings::values.custom_top_x); + ReadSetting("Layout", Settings::values.custom_top_y); + ReadSetting("Layout", Settings::values.custom_top_width); + ReadSetting("Layout", Settings::values.custom_top_height); + ReadSetting("Layout", Settings::values.custom_bottom_x); + ReadSetting("Layout", Settings::values.custom_bottom_y); + ReadSetting("Layout", Settings::values.custom_bottom_width); + ReadSetting("Layout", Settings::values.custom_bottom_height); ReadSetting("Layout", Settings::values.cardboard_screen_size); ReadSetting("Layout", Settings::values.cardboard_x_shift); ReadSetting("Layout", Settings::values.cardboard_y_shift); diff --git a/src/android/app/src/main/jni/default_ini.h b/src/android/app/src/main/jni/default_ini.h index c8e69f94a..e0babfd5a 100644 --- a/src/android/app/src/main/jni/default_ini.h +++ b/src/android/app/src/main/jni/default_ini.h @@ -186,14 +186,14 @@ custom_layout = # Screen placement when using Custom layout option # 0x, 0y is the top left corner of the render window. -custom_top_left = -custom_top_top = -custom_top_right = -custom_top_bottom = -custom_bottom_left = -custom_bottom_top = -custom_bottom_right = -custom_bottom_bottom = +custom_top_x = +custom_top_y = +custom_top_width = +custom_top_height = +custom_bottom_x = +custom_bottom_y = +custom_bottom_width = +custom_bottom_height = # 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. diff --git a/src/common/settings.h b/src/common/settings.h index e52116c19..6eca417cf 100644 --- a/src/common/settings.h +++ b/src/common/settings.h @@ -486,14 +486,14 @@ struct Values { SwitchableSetting large_screen_proportion{4.f, 1.f, 16.f, "large_screen_proportion"}; Setting custom_layout{false, "custom_layout"}; - Setting custom_top_left{0, "custom_top_left"}; - Setting custom_top_top{0, "custom_top_top"}; - Setting custom_top_right{400, "custom_top_right"}; - Setting custom_top_bottom{240, "custom_top_bottom"}; - Setting custom_bottom_left{40, "custom_bottom_left"}; - Setting custom_bottom_top{240, "custom_bottom_top"}; - Setting custom_bottom_right{360, "custom_bottom_right"}; - Setting custom_bottom_bottom{480, "custom_bottom_bottom"}; + Setting custom_top_x{0, "custom_top_x"}; + Setting custom_top_y{0, "custom_top_y"}; + Setting custom_top_width{400, "custom_top_width"}; + Setting custom_top_height{240, "custom_top_height"}; + Setting custom_bottom_x{40, "custom_bottom_x"}; + Setting custom_bottom_y{240, "custom_bottom_y"}; + Setting custom_bottom_width{360, "custom_bottom_width"}; + Setting custom_bottom_height{480, "custom_bottom_height"}; Setting custom_second_layer_opacity{100, "custom_second_layer_opacity"}; SwitchableSetting bg_red{0.f, "bg_red"}; diff --git a/src/core/frontend/framebuffer_layout.cpp b/src/core/frontend/framebuffer_layout.cpp index 481de040c..56bab1155 100644 --- a/src/core/frontend/framebuffer_layout.cpp +++ b/src/core/frontend/framebuffer_layout.cpp @@ -377,18 +377,18 @@ FramebufferLayout CustomFrameLayout(u32 width, u32 height, bool is_swapped) { FramebufferLayout res{width, height, true, true, {}, {}, !Settings::values.upright_screen}; - Common::Rectangle top_screen{Settings::values.custom_top_left.GetValue(), - Settings::values.custom_top_top.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(), - (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())}; + Common::Rectangle top_screen{Settings::values.custom_top_x.GetValue(), + Settings::values.custom_top_y.GetValue(), + (u32)(Settings::values.custom_top_x.GetValue() + + Settings::values.custom_top_width.GetValue()), + (u32)(Settings::values.custom_top_y.GetValue() + + Settings::values.custom_top_height.GetValue())}; + Common::Rectangle bot_screen{Settings::values.custom_bottom_x.GetValue(), + Settings::values.custom_bottom_y.GetValue(), + (u32)(Settings::values.custom_bottom_x.GetValue() + + Settings::values.custom_bottom_width.GetValue()), + (u32)(Settings::values.custom_bottom_y.GetValue() + + Settings::values.custom_bottom_height.GetValue())}; if (is_swapped) { 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) { if (Settings::values.custom_layout.GetValue() == true) { - return CustomFrameLayout(std::max(Settings::values.custom_top_right.GetValue(), - Settings::values.custom_bottom_right.GetValue()), - std::max(Settings::values.custom_top_bottom.GetValue(), - Settings::values.custom_bottom_bottom.GetValue()), + return CustomFrameLayout(std::max(Settings::values.custom_top_width.GetValue(), + Settings::values.custom_bottom_width.GetValue()), + std::max(Settings::values.custom_top_height.GetValue(), + Settings::values.custom_bottom_height.GetValue()), Settings::values.swap_screen.GetValue()); } diff --git a/src/lime/config.cpp b/src/lime/config.cpp index 17b452123..165df98b6 100644 --- a/src/lime/config.cpp +++ b/src/lime/config.cpp @@ -165,14 +165,14 @@ void Config::ReadValues() { ReadSetting("Layout", Settings::values.upright_screen); ReadSetting("Layout", Settings::values.large_screen_proportion); ReadSetting("Layout", Settings::values.custom_layout); - ReadSetting("Layout", Settings::values.custom_top_left); - ReadSetting("Layout", Settings::values.custom_top_top); - ReadSetting("Layout", Settings::values.custom_top_right); - ReadSetting("Layout", Settings::values.custom_top_bottom); - ReadSetting("Layout", Settings::values.custom_bottom_left); - ReadSetting("Layout", Settings::values.custom_bottom_top); - ReadSetting("Layout", Settings::values.custom_bottom_right); - ReadSetting("Layout", Settings::values.custom_bottom_bottom); + ReadSetting("Layout", Settings::values.custom_top_x); + ReadSetting("Layout", Settings::values.custom_top_y); + ReadSetting("Layout", Settings::values.custom_top_width); + ReadSetting("Layout", Settings::values.custom_top_height); + ReadSetting("Layout", Settings::values.custom_bottom_x); + ReadSetting("Layout", Settings::values.custom_bottom_y); + ReadSetting("Layout", Settings::values.custom_bottom_width); + ReadSetting("Layout", Settings::values.custom_bottom_height); ReadSetting("Layout", Settings::values.custom_second_layer_opacity); // Utility diff --git a/src/lime/default_ini.h b/src/lime/default_ini.h index dec0d5714..fa1911971 100644 --- a/src/lime/default_ini.h +++ b/src/lime/default_ini.h @@ -197,14 +197,14 @@ custom_layout = # Screen placement when using Custom layout option # 0x, 0y is the top left corner of the render window. -custom_top_left = -custom_top_top = -custom_top_right = -custom_top_bottom = -custom_bottom_left = -custom_bottom_top = -custom_bottom_right = -custom_bottom_bottom = +custom_top_x = +custom_top_y = +custom_top_width = +custom_top_height = +custom_bottom_x = +custom_bottom_y = +custom_bottom_width = +custom_bottom_height = # Opacity of second layer when using custom layout option (bottom screen unless swapped) custom_second_layer_opacity = diff --git a/src/lime_qt/configuration/config.cpp b/src/lime_qt/configuration/config.cpp index 3eba3f958..7453587b8 100644 --- a/src/lime_qt/configuration/config.cpp +++ b/src/lime_qt/configuration/config.cpp @@ -519,14 +519,14 @@ void Config::ReadLayoutValues() { if (global) { ReadBasicSetting(Settings::values.mono_render_option); ReadBasicSetting(Settings::values.custom_layout); - ReadBasicSetting(Settings::values.custom_top_left); - ReadBasicSetting(Settings::values.custom_top_top); - ReadBasicSetting(Settings::values.custom_top_right); - ReadBasicSetting(Settings::values.custom_top_bottom); - ReadBasicSetting(Settings::values.custom_bottom_left); - ReadBasicSetting(Settings::values.custom_bottom_top); - ReadBasicSetting(Settings::values.custom_bottom_right); - ReadBasicSetting(Settings::values.custom_bottom_bottom); + ReadBasicSetting(Settings::values.custom_top_x); + ReadBasicSetting(Settings::values.custom_top_y); + ReadBasicSetting(Settings::values.custom_top_width); + ReadBasicSetting(Settings::values.custom_top_height); + ReadBasicSetting(Settings::values.custom_bottom_x); + ReadBasicSetting(Settings::values.custom_bottom_y); + ReadBasicSetting(Settings::values.custom_bottom_width); + ReadBasicSetting(Settings::values.custom_bottom_height); ReadBasicSetting(Settings::values.custom_second_layer_opacity); } @@ -1061,14 +1061,14 @@ void Config::SaveLayoutValues() { if (global) { WriteBasicSetting(Settings::values.mono_render_option); WriteBasicSetting(Settings::values.custom_layout); - WriteBasicSetting(Settings::values.custom_top_left); - WriteBasicSetting(Settings::values.custom_top_top); - WriteBasicSetting(Settings::values.custom_top_right); - WriteBasicSetting(Settings::values.custom_top_bottom); - WriteBasicSetting(Settings::values.custom_bottom_left); - WriteBasicSetting(Settings::values.custom_bottom_top); - WriteBasicSetting(Settings::values.custom_bottom_right); - WriteBasicSetting(Settings::values.custom_bottom_bottom); + WriteBasicSetting(Settings::values.custom_top_x); + WriteBasicSetting(Settings::values.custom_top_y); + WriteBasicSetting(Settings::values.custom_top_width); + WriteBasicSetting(Settings::values.custom_top_height); + WriteBasicSetting(Settings::values.custom_bottom_x); + WriteBasicSetting(Settings::values.custom_bottom_y); + WriteBasicSetting(Settings::values.custom_bottom_width); + WriteBasicSetting(Settings::values.custom_bottom_height); WriteBasicSetting(Settings::values.custom_second_layer_opacity); } diff --git a/src/lime_qt/configuration/configure_layout.cpp b/src/lime_qt/configuration/configure_layout.cpp index 6b9945ff3..187865647 100644 --- a/src/lime_qt/configuration/configure_layout.cpp +++ b/src/lime_qt/configuration/configure_layout.cpp @@ -56,14 +56,14 @@ void ConfigureLayout::SetConfiguration() { ui->toggle_swap_screen->setChecked(Settings::values.swap_screen.GetValue()); ui->toggle_upright_screen->setChecked(Settings::values.upright_screen.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_top->setValue(Settings::values.custom_top_top.GetValue()); - ui->custom_top_right->setValue(Settings::values.custom_top_right.GetValue()); - ui->custom_top_bottom->setValue(Settings::values.custom_top_bottom.GetValue()); - ui->custom_bottom_left->setValue(Settings::values.custom_bottom_left.GetValue()); - ui->custom_bottom_top->setValue(Settings::values.custom_bottom_top.GetValue()); - ui->custom_bottom_right->setValue(Settings::values.custom_bottom_right.GetValue()); - ui->custom_bottom_bottom->setValue(Settings::values.custom_bottom_bottom.GetValue()); + ui->custom_top_x->setValue(Settings::values.custom_top_x.GetValue()); + ui->custom_top_y->setValue(Settings::values.custom_top_y.GetValue()); + ui->custom_top_width->setValue(Settings::values.custom_top_width.GetValue()); + ui->custom_top_height->setValue(Settings::values.custom_top_height.GetValue()); + ui->custom_bottom_x->setValue(Settings::values.custom_bottom_x.GetValue()); + ui->custom_bottom_y->setValue(Settings::values.custom_bottom_y.GetValue()); + ui->custom_bottom_width->setValue(Settings::values.custom_bottom_width.GetValue()); + ui->custom_bottom_height->setValue(Settings::values.custom_bottom_height.GetValue()); ui->custom_second_layer_opacity->setValue( Settings::values.custom_second_layer_opacity.GetValue()); bg_color = @@ -82,14 +82,14 @@ void ConfigureLayout::RetranslateUI() { void ConfigureLayout::ApplyConfiguration() { Settings::values.large_screen_proportion = ui->large_screen_proportion->value(); - Settings::values.custom_top_left = ui->custom_top_left->value(); - Settings::values.custom_top_top = ui->custom_top_top->value(); - Settings::values.custom_top_right = ui->custom_top_right->value(); - Settings::values.custom_top_bottom = ui->custom_top_bottom->value(); - Settings::values.custom_bottom_left = ui->custom_bottom_left->value(); - Settings::values.custom_bottom_top = ui->custom_bottom_top->value(); - Settings::values.custom_bottom_right = ui->custom_bottom_right->value(); - Settings::values.custom_bottom_bottom = ui->custom_bottom_bottom->value(); + Settings::values.custom_top_x = ui->custom_top_x->value(); + Settings::values.custom_top_y = ui->custom_top_y->value(); + Settings::values.custom_top_width = ui->custom_top_width->value(); + Settings::values.custom_top_height = ui->custom_top_height->value(); + Settings::values.custom_bottom_x = ui->custom_bottom_x->value(); + Settings::values.custom_bottom_y = ui->custom_bottom_y->value(); + Settings::values.custom_bottom_width = ui->custom_bottom_width->value(); + Settings::values.custom_bottom_height = ui->custom_bottom_height->value(); Settings::values.custom_second_layer_opacity = ui->custom_second_layer_opacity->value(); ConfigurationShared::ApplyPerGameSetting(&Settings::values.layout_option, ui->layout_combobox); diff --git a/src/lime_qt/configuration/configure_layout.ui b/src/lime_qt/configuration/configure_layout.ui index 09fa0f7c3..ff1dcf94d 100644 --- a/src/lime_qt/configuration/configure_layout.ui +++ b/src/lime_qt/configuration/configure_layout.ui @@ -198,14 +198,14 @@ - + X Position - + QAbstractSpinBox::NoButtons @@ -215,14 +215,14 @@ - + Y Position - + QAbstractSpinBox::NoButtons @@ -232,14 +232,14 @@ - + Width - + QAbstractSpinBox::NoButtons @@ -249,14 +249,14 @@ - + Height - + QAbstractSpinBox::NoButtons @@ -281,14 +281,14 @@ - + X Position - + QAbstractSpinBox::NoButtons @@ -298,14 +298,14 @@ - + Y Position - + QAbstractSpinBox::NoButtons @@ -315,14 +315,14 @@ - + Width - + QAbstractSpinBox::NoButtons @@ -332,14 +332,14 @@ - + Height - + QAbstractSpinBox::NoButtons