Initial underlying code support for more than 2 video cards
This commit is contained in:
@@ -145,9 +145,11 @@ main_thread_fn()
|
||||
}
|
||||
|
||||
is_quit = 1;
|
||||
if (gfxcard[1]) {
|
||||
ui_deinit_monitor(1);
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(500));
|
||||
for (uint8_t i = 1; i < GFXCARD_MAX; i ++) {
|
||||
if (gfxcard[i]) {
|
||||
ui_deinit_monitor(i);
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(500));
|
||||
}
|
||||
}
|
||||
QTimer::singleShot(0, QApplication::instance(), []() { QApplication::processEvents(); QApplication::instance()->quit(); });
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -3,6 +3,8 @@
|
||||
|
||||
#include <QWidget>
|
||||
|
||||
#define VIDEOCARD_MAX 2
|
||||
|
||||
namespace Ui {
|
||||
class SettingsDisplay;
|
||||
}
|
||||
@@ -36,7 +38,7 @@ private slots:
|
||||
private:
|
||||
Ui::SettingsDisplay *ui;
|
||||
int machineId = 0;
|
||||
int videoCard[2] = { 0, 0 };
|
||||
int videoCard[VIDEOCARD_MAX] = { 0, 0 };
|
||||
};
|
||||
|
||||
#endif // QT_SETTINGSDISPLAY_HPP
|
||||
|
||||
Reference in New Issue
Block a user