Initial underlying code support for more than 2 video cards

This commit is contained in:
Jasmine Iwanek
2024-06-29 19:43:42 -04:00
parent dfe83ac32a
commit 322adf1c2b
8 changed files with 54 additions and 33 deletions

View File

@@ -36,8 +36,8 @@ SettingsDisplay::SettingsDisplay(QWidget *parent)
{
ui->setupUi(this);
videoCard[0] = gfxcard[0];
videoCard[1] = gfxcard[1];
for (uint8_t i = 0; i < GFXCARD_MAX; i ++)
videoCard[i] = gfxcard[i];
onCurrentMachineChanged(machine);
}
@@ -50,7 +50,9 @@ void
SettingsDisplay::save()
{
gfxcard[0] = ui->comboBoxVideo->currentData().toInt();
gfxcard[1] = ui->comboBoxVideoSecondary->currentData().toInt();
// TODO
for (uint8_t i = 1; i < GFXCARD_MAX; i ++)
gfxcard[i] = ui->comboBoxVideoSecondary->currentData().toInt();
voodoo_enabled = ui->checkBoxVoodoo->isChecked() ? 1 : 0;
ibm8514_standalone_enabled = ui->checkBox8514->isChecked() ? 1 : 0;
xga_standalone_enabled = ui->checkBoxXga->isChecked() ? 1 : 0;
@@ -103,8 +105,10 @@ SettingsDisplay::onCurrentMachineChanged(int machineId)
ui->pushButtonConfigureSecondary->setEnabled(true);
}
ui->comboBoxVideo->setCurrentIndex(selectedRow);
if (gfxcard[1] == 0)
ui->pushButtonConfigureSecondary->setEnabled(false);
// TODO
for (uint8_t i = 1; i < GFXCARD_MAX; i ++)
if (gfxcard[i] == 0)
ui->pushButtonConfigureSecondary->setEnabled(false);
}
void