diff --git a/src/qt/qt_settingsdisplay.cpp b/src/qt/qt_settingsdisplay.cpp index 4d8919a73..631e3b966 100644 --- a/src/qt/qt_settingsdisplay.cpp +++ b/src/qt/qt_settingsdisplay.cpp @@ -139,6 +139,7 @@ SettingsDisplay::on_comboBoxVideo_currentIndexChanged(int index) if (index < 0) { return; } + static QRegularExpression voodooRegex("3dfx|voodoo|banshee", QRegularExpression::CaseInsensitiveOption); auto curVideoCard_2 = videoCard[1]; videoCard[0] = ui->comboBoxVideo->currentData().toInt(); if (videoCard[0] == VID_INTERNAL) @@ -207,6 +208,25 @@ SettingsDisplay::on_comboBoxVideo_currentIndexChanged(int index) ui->comboBoxVideoSecondary->setCurrentIndex(0); ui->pushButtonConfigureSecondary->setEnabled(false); } + + // Is the currently selected video card a voodoo? + if (ui->comboBoxVideo->currentText().contains(voodooRegex)) { + // Get the name of the video card currently in use + const device_t *video_dev = video_card_getdevice(gfxcard[0]); + const QString currentVideoName = DeviceConfig::DeviceName(video_dev, video_get_internal_name(gfxcard[0]), 1); + // Is it a voodoo? + const bool currentCardIsVoodoo = currentVideoName.contains(voodooRegex); + // Don't uncheck if + // * Current card is voodoo + // * Add-on voodoo was manually overridden in config + if (ui->checkBoxVoodoo->isChecked() && !currentCardIsVoodoo) { + // Otherwise, uncheck the add-on voodoo when a main voodoo is selected + ui->checkBoxVoodoo->setCheckState(Qt::Unchecked); + } + ui->checkBoxVoodoo->setDisabled(true); + } else { + ui->checkBoxVoodoo->setDisabled(false); + } } void diff --git a/src/qt/qt_settingsdisplay.ui b/src/qt/qt_settingsdisplay.ui index 5dd76287f..a9b7e6e2c 100644 --- a/src/qt/qt_settingsdisplay.ui +++ b/src/qt/qt_settingsdisplay.ui @@ -61,15 +61,15 @@ - - 30 - 0 0 + + 30 + @@ -102,7 +102,7 @@ - Voodoo Graphics + Voodoo 1 or 2 Graphics @@ -122,15 +122,15 @@ - - 30 - 0 0 + + 30 +