compliant code style

This commit is contained in:
blakdulz 2023-05-15 11:32:52 +07:00
parent c60b0d39c2
commit 1d1d99d7bd
3 changed files with 7 additions and 5 deletions

View File

@ -22,7 +22,8 @@ ConfigureEnhancements::ConfigureEnhancements(QWidget* parent)
const bool res_scale_enabled = graphics_api != Settings::GraphicsAPI::Software;
ui->resolution_factor_combobox->setEnabled(res_scale_enabled);
ui->custom_layout_group->setEnabled((Settings::values.layout_option.GetValue() == Settings::LayoutOption::CustomLayout));
ui->custom_layout_group->setEnabled(
(Settings::values.layout_option.GetValue() == Settings::LayoutOption::CustomLayout));
connect(ui->layout_combobox,
static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged), this,
[this](int currentIndex) {
@ -97,7 +98,8 @@ void ConfigureEnhancements::SetConfiguration() {
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_second_layer_opacity->setValue(Settings::values.custom_second_layer_opacity.GetValue());
ui->custom_second_layer_opacity->setValue(
Settings::values.custom_second_layer_opacity.GetValue());
ui->toggle_dump_textures->setChecked(Settings::values.dump_textures.GetValue());
ui->toggle_custom_textures->setChecked(Settings::values.custom_textures.GetValue());
ui->toggle_preload_textures->setChecked(Settings::values.preload_textures.GetValue());

View File

@ -2662,7 +2662,7 @@ void GMainWindow::SyncMenuUISettings() {
ui->action_Screen_Layout_Separate_Windows->setChecked(
Settings::values.layout_option.GetValue() == Settings::LayoutOption::SeparateWindows);
ui->action_Screen_Layout_Custom_Layout->setChecked(Settings::values.layout_option.GetValue() ==
Settings::LayoutOption::CustomLayout);
Settings::LayoutOption::CustomLayout);
ui->action_Screen_Layout_Swap_Screens->setChecked(Settings::values.swap_screen.GetValue());
ui->action_Screen_Layout_Upright_Screens->setChecked(
Settings::values.upright_screen.GetValue());

View File

@ -947,7 +947,7 @@ void RendererOpenGL::DrawScreens(const Layout::FramebufferLayout& layout, bool f
void RendererOpenGL::ApplySecondLayerOpacity() {
if ((Settings::values.layout_option.GetValue() == Settings::LayoutOption::CustomLayout ||
Settings::values.custom_layout) &&
Settings::values.custom_layout) &&
Settings::values.custom_second_layer_opacity.GetValue() < 100) {
state.blend.src_rgb_func = GL_CONSTANT_ALPHA;
state.blend.src_a_func = GL_CONSTANT_ALPHA;
@ -959,7 +959,7 @@ void RendererOpenGL::ApplySecondLayerOpacity() {
void RendererOpenGL::ResetSecondLayerOpacity() {
if ((Settings::values.layout_option.GetValue() == Settings::LayoutOption::CustomLayout ||
Settings::values.custom_layout) &&
Settings::values.custom_layout) &&
Settings::values.custom_second_layer_opacity.GetValue() < 100) {
state.blend.src_rgb_func = GL_ONE;
state.blend.dst_rgb_func = GL_ZERO;