qt: Add the FM synth driver select option to the UI

This commit is contained in:
Alexander Babikov
2022-07-26 10:13:23 +05:00
parent 1261f1cedb
commit 2706366b21
2 changed files with 43 additions and 0 deletions

View File

@@ -25,6 +25,7 @@ extern "C" {
#include <86box/sound.h>
#include <86box/midi.h>
#include <86box/snd_mpu401.h>
#include <86box/snd_opl.h>
}
#include "qt_deviceconfig.hpp"
@@ -52,6 +53,10 @@ void SettingsSound::save() {
GAMEBLASTER = ui->checkBoxCMS->isChecked() ? 1 : 0;
GUS = ui->checkBoxGUS->isChecked() ? 1 : 0;;
sound_is_float = ui->checkBoxFloat32->isChecked() ? 1 : 0;;
if (ui->radioButtonYMFM->isChecked())
fm_driver = FM_DRV_YMFM;
else
fm_driver = FM_DRV_NUKED;
}
void SettingsSound::onCurrentMachineChanged(int machineId) {
@@ -151,6 +156,15 @@ void SettingsSound::onCurrentMachineChanged(int machineId) {
ui->pushButtonConfigureGUS->setEnabled((GUS > 0) && hasIsa16);
ui->checkBoxSSI2001->setEnabled(hasIsa);
ui->pushButtonConfigureSSI2001->setEnabled((SSI2001 > 0) && hasIsa);
switch (fm_driver) {
case FM_DRV_YMFM:
ui->radioButtonYMFM->setChecked(true);
break;
case FM_DRV_NUKED:
default:
ui->radioButtonNuked->setChecked(true);
break;
}
}
static bool allowMpu401(Ui::SettingsSound *ui) {