diff --git a/src/qt_gui/settings_dialog.cpp b/src/qt_gui/settings_dialog.cpp index 5bac9dd2d3..7e5bc2335c 100644 --- a/src/qt_gui/settings_dialog.cpp +++ b/src/qt_gui/settings_dialog.cpp @@ -91,8 +91,8 @@ SettingsDialog::SettingsDialog(std::span physical_devices, ui->backButtonBehaviorComboBox->addItem(tr("Touchpad Right"), "right"); ui->backButtonBehaviorComboBox->addItem(tr("None"), "none"); - ui->ppFilterComboBox->addItem(tr("linear")); - ui->ppFilterComboBox->addItem(tr("nearest")); + ui->ppFilterComboBox->addItem(tr("Linear"), "linear"); + ui->ppFilterComboBox->addItem(tr("Nearest"), "nearest"); InitializeEmulatorLanguages(); LoadValuesFromConfig(); @@ -305,7 +305,11 @@ void SettingsDialog::LoadValuesFromConfig() { ui->widthSpinBox->setValue(toml::find_or(data, "GPU", "screenWidth", 1280)); ui->heightSpinBox->setValue(toml::find_or(data, "GPU", "screenHeight", 720)); ui->vblankSpinBox->setValue(toml::find_or(data, "GPU", "vblankDivider", 1)); - ui->ppFilterComboBox->setCurrentText(QString::fromStdString(toml::find_or(data, "GPU", "ppFilter", "linear"))); + if (const auto i = ui->ppFilterComboBox->findData( + QString::fromStdString(toml::find_or(data, "GPU", "ppFilter", "linear"))); + i != -1) { + ui->ppFilterComboBox->setCurrentIndex(i); + } ui->dumpShadersCheckBox->setChecked(toml::find_or(data, "GPU", "dumpShaders", false)); ui->nullGpuCheckBox->setChecked(toml::find_or(data, "GPU", "nullGpu", false)); ui->playBGMCheckBox->setChecked(toml::find_or(data, "General", "playBGM", false)); @@ -570,7 +574,7 @@ void SettingsDialog::UpdateSettings() { Config::setScreenWidth(ui->widthSpinBox->value()); Config::setScreenHeight(ui->heightSpinBox->value()); Config::setVblankDiv(ui->vblankSpinBox->value()); - Config::setPostProcessingFilter(ui->ppFilterComboBox->currentText().toStdString()); + Config::setPostProcessingFilter(ui->ppFilterComboBox->currentData().toString().toStdString()); Config::setDumpShaders(ui->dumpShadersCheckBox->isChecked()); Config::setNullGpu(ui->nullGpuCheckBox->isChecked()); Config::setSeparateUpdateEnabled(ui->separateUpdatesCheckBox->isChecked());