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
+
-
diff --git a/src/qt/qt_settingsmachine.cpp b/src/qt/qt_settingsmachine.cpp
index 475730db9..aff55203e 100644
--- a/src/qt/qt_settingsmachine.cpp
+++ b/src/qt/qt_settingsmachine.cpp
@@ -61,6 +61,11 @@ SettingsMachine::SettingsMachine(QWidget *parent)
break;
}
+ auto warning_icon = ui->softFloatWarningIcon->style()->standardIcon(QStyle::SP_MessageBoxWarning);
+ ui->softFloatWarningIcon->setPixmap(warning_icon.pixmap(warning_icon.actualSize(QSize(16, 16))));
+ ui->softFloatWarningIcon->setVisible(false);
+ ui->softFloatWarningText->setVisible(false);
+
auto *waitStatesModel = ui->comboBoxWaitStates->model();
waitStatesModel->insertRows(0, 9);
auto idx = waitStatesModel->index(0, 0);
@@ -337,3 +342,13 @@ SettingsMachine::on_pushButtonConfigure_clicked()
const auto *device = machine_get_device(machineId);
DeviceConfig::ConfigureDevice(device, 0, qobject_cast(Settings::settings));
}
+
+void SettingsMachine::on_checkBoxFPUSoftfloat_stateChanged(int state) {
+ if(state == Qt::Checked) {
+ ui->softFloatWarningIcon->setVisible(true);
+ ui->softFloatWarningText->setVisible(true);
+ } else {
+ ui->softFloatWarningIcon->setVisible(false);
+ ui->softFloatWarningText->setVisible(false);
+ }
+}
\ No newline at end of file
diff --git a/src/qt/qt_settingsmachine.hpp b/src/qt/qt_settingsmachine.hpp
index 9d0ec62ff..7e89d7fa4 100644
--- a/src/qt/qt_settingsmachine.hpp
+++ b/src/qt/qt_settingsmachine.hpp
@@ -35,6 +35,7 @@ private slots:
private slots:
void on_comboBoxMachineType_currentIndexChanged(int index);
+ void on_checkBoxFPUSoftfloat_stateChanged(int state);
private:
Ui::SettingsMachine *ui;
diff --git a/src/qt/qt_settingsmachine.ui b/src/qt/qt_settingsmachine.ui
index 54bc06f5c..0c9c2708e 100644
--- a/src/qt/qt_settingsmachine.ui
+++ b/src/qt/qt_settingsmachine.ui
@@ -7,7 +7,7 @@
0
0
458
- 434
+ 459
@@ -41,13 +41,6 @@
0
-
-
-
-
- Wait states:
-
-
-
-
@@ -55,6 +48,13 @@
+ -
+
+
+ FPU:
+
+
+
-
@@ -69,55 +69,21 @@
- -
-
-
-
- 0
-
-
- 0
-
-
- 0
-
-
- 0
-
-
-
-
-
- 30
-
-
-
- 0
- 0
-
-
-
-
- -
-
-
- PIT mode:
-
-
-
- -
-
-
- 30
-
-
-
- 0
- 0
-
-
-
-
-
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ -
+
+
+ Machine type:
+
-
@@ -144,15 +110,15 @@
-
-
- 30
-
0
0
+
+ 30
+
-
@@ -167,27 +133,31 @@
-
-
- 30
-
0
0
+
+ 30
+
- -
-
-
-
- 0
- 0
-
+
-
+
+
+ Wait states:
+
+
+
+ -
+
+
+ Machine:
@@ -229,55 +199,120 @@
- -
-
-
- Machine type:
-
-
-
- -
-
-
- Machine:
-
-
-
- -
-
-
- FPU:
-
+
-
+
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
-
+
+
+
+ 0
+ 0
+
+
+
+ 30
+
+
+
+ -
+
+
+ PIT mode:
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+ 30
+
+
+
+
-
-
-
-
- 2
- 2
-
-
-
- Dynamic Recompiler
-
-
+
+
-
+
+
+
+ 2
+ 2
+
+
+
+ Dynamic Recompiler
+
+
+
+
-
-
-
-
- 3
- 3
-
-
-
- Softfloat FPU
-
-
+
+
-
+
+
+
+ 3
+ 3
+
+
+
+ Softfloat FPU
+
+
+
+ -
+
+
+
+
+
+
+ -
+
+
+ High performance impact
+
+
+
+ -
+
+
+ Qt::Horizontal
+
+
+
+ 40
+ 20
+
+
+
+
+
-