diff options
| author | 2019-06-05 15:26:13 -0400 | |
|---|---|---|
| committer | 2019-06-05 15:26:13 -0400 | |
| commit | 6ce5f3e1bf9c32d8a9258e10c7953380aacdda4e (patch) | |
| tree | 8462e3b669dbb8d40a4ebcad4fc70a4cb9dc8a63 /src | |
| parent | Merge pull request #2532 from ShalokShalom/patch-2 (diff) | |
| parent | yuzu/configuration/configure_graphics: Eliminate type narrowing in a connect ... (diff) | |
| download | yuzu-6ce5f3e1bf9c32d8a9258e10c7953380aacdda4e.tar.gz yuzu-6ce5f3e1bf9c32d8a9258e10c7953380aacdda4e.tar.xz yuzu-6ce5f3e1bf9c32d8a9258e10c7953380aacdda4e.zip | |
Merge pull request #2515 from lioncash/narrowing
yuzu/configuration/configure_graphics: Eliminate type narrowing in a connect call
Diffstat (limited to 'src')
| -rw-r--r-- | src/yuzu/configuration/configure_graphics.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/yuzu/configuration/configure_graphics.cpp b/src/yuzu/configuration/configure_graphics.cpp index 08ea41b0f..6daf82ab1 100644 --- a/src/yuzu/configuration/configure_graphics.cpp +++ b/src/yuzu/configuration/configure_graphics.cpp | |||
| @@ -51,17 +51,15 @@ Resolution FromResolutionFactor(float factor) { | |||
| 51 | 51 | ||
| 52 | ConfigureGraphics::ConfigureGraphics(QWidget* parent) | 52 | ConfigureGraphics::ConfigureGraphics(QWidget* parent) |
| 53 | : QWidget(parent), ui(new Ui::ConfigureGraphics) { | 53 | : QWidget(parent), ui(new Ui::ConfigureGraphics) { |
| 54 | |||
| 55 | ui->setupUi(this); | 54 | ui->setupUi(this); |
| 56 | this->setConfiguration(); | 55 | setConfiguration(); |
| 57 | 56 | ||
| 58 | ui->frame_limit->setEnabled(Settings::values.use_frame_limit); | 57 | connect(ui->toggle_frame_limit, &QCheckBox::toggled, ui->frame_limit, &QSpinBox::setEnabled); |
| 59 | connect(ui->toggle_frame_limit, &QCheckBox::stateChanged, ui->frame_limit, | ||
| 60 | &QSpinBox::setEnabled); | ||
| 61 | connect(ui->bg_button, &QPushButton::clicked, this, [this] { | 58 | connect(ui->bg_button, &QPushButton::clicked, this, [this] { |
| 62 | const QColor new_bg_color = QColorDialog::getColor(bg_color); | 59 | const QColor new_bg_color = QColorDialog::getColor(bg_color); |
| 63 | if (!new_bg_color.isValid()) | 60 | if (!new_bg_color.isValid()) { |
| 64 | return; | 61 | return; |
| 62 | } | ||
| 65 | UpdateBackgroundColorButton(new_bg_color); | 63 | UpdateBackgroundColorButton(new_bg_color); |
| 66 | }); | 64 | }); |
| 67 | } | 65 | } |
| @@ -74,6 +72,7 @@ void ConfigureGraphics::setConfiguration() { | |||
| 74 | ui->resolution_factor_combobox->setCurrentIndex( | 72 | ui->resolution_factor_combobox->setCurrentIndex( |
| 75 | static_cast<int>(FromResolutionFactor(Settings::values.resolution_factor))); | 73 | static_cast<int>(FromResolutionFactor(Settings::values.resolution_factor))); |
| 76 | ui->toggle_frame_limit->setChecked(Settings::values.use_frame_limit); | 74 | ui->toggle_frame_limit->setChecked(Settings::values.use_frame_limit); |
| 75 | ui->frame_limit->setEnabled(ui->toggle_frame_limit->isChecked()); | ||
| 77 | ui->frame_limit->setValue(Settings::values.frame_limit); | 76 | ui->frame_limit->setValue(Settings::values.frame_limit); |
| 78 | ui->use_compatibility_profile->setEnabled(runtime_lock); | 77 | ui->use_compatibility_profile->setEnabled(runtime_lock); |
| 79 | ui->use_compatibility_profile->setChecked(Settings::values.use_compatibility_profile); | 78 | ui->use_compatibility_profile->setChecked(Settings::values.use_compatibility_profile); |