From daf981e7c2f91d48459d8f8e0c634949ca3133df Mon Sep 17 00:00:00 2001 From: Arisotura Date: Thu, 23 May 2024 02:23:24 +0200 Subject: [PATCH] port audio settings to new config system --- src/frontend/qt_sdl/AudioSettingsDialog.cpp | 104 +++++++++++++------- src/frontend/qt_sdl/AudioSettingsDialog.h | 4 + src/frontend/qt_sdl/Config.h | 8 -- src/frontend/qt_sdl/EmuInstance.cpp | 4 +- src/frontend/qt_sdl/EmuInstance.h | 10 ++ src/frontend/qt_sdl/EmuInstanceAudio.cpp | 24 +++-- src/frontend/qt_sdl/EmuSettingsDialog.cpp | 13 ++- src/frontend/qt_sdl/EmuSettingsDialog.h | 3 + src/frontend/qt_sdl/EmuThread.cpp | 4 +- src/frontend/qt_sdl/Window.cpp | 24 +++-- src/frontend/qt_sdl/Window.h | 6 +- src/frontend/qt_sdl/main.cpp | 3 - 12 files changed, 132 insertions(+), 75 deletions(-) diff --git a/src/frontend/qt_sdl/AudioSettingsDialog.cpp b/src/frontend/qt_sdl/AudioSettingsDialog.cpp index e42d0b03..4a101c38 100644 --- a/src/frontend/qt_sdl/AudioSettingsDialog.cpp +++ b/src/frontend/qt_sdl/AudioSettingsDialog.cpp @@ -16,7 +16,6 @@ with melonDS. If not, see http://www.gnu.org/licenses/. */ -#include #include #include @@ -25,12 +24,10 @@ #include "Config.h" #include "NDS.h" #include "DSi.h" -#include "DSi_I2C.h" #include "AudioSettingsDialog.h" #include "ui_AudioSettingsDialog.h" #include "main.h" -#include "EmuInstance.h" using namespace melonDS; AudioSettingsDialog* AudioSettingsDialog::currentDlg = nullptr; @@ -44,41 +41,49 @@ AudioSettingsDialog::AudioSettingsDialog(QWidget* parent) : QDialog(parent), ui( setAttribute(Qt::WA_DeleteOnClose); emuInstance = ((MainWindow*)parent)->getEmuInstance(); + auto& cfg = emuInstance->getGlobalConfig(); + auto& instcfg = emuInstance->getLocalConfig(); bool emuActive = emuInstance->getEmuThread()->emuIsActive(); - oldInterp = Config::AudioInterp; - oldBitDepth = Config::AudioBitDepth; - oldVolume = Config::AudioVolume; - oldDSiSync = Config::DSiVolumeSync; + oldInterp = cfg.GetInt("Audio.Interpolation"); + oldBitDepth = cfg.GetInt("Audio.BitDepth"); + oldVolume = instcfg.GetInt("Audio.Volume"); + oldDSiSync = instcfg.GetBool("Audio.DSiVolumeSync"); + + volume = oldVolume; + dsiSync = oldDSiSync; ui->cbInterpolation->addItem("None"); ui->cbInterpolation->addItem("Linear"); ui->cbInterpolation->addItem("Cosine"); ui->cbInterpolation->addItem("Cubic"); ui->cbInterpolation->addItem("Gaussian (SNES)"); - ui->cbInterpolation->setCurrentIndex(Config::AudioInterp); + ui->cbInterpolation->setCurrentIndex(oldInterp); ui->cbBitDepth->addItem("Automatic"); ui->cbBitDepth->addItem("10-bit"); ui->cbBitDepth->addItem("16-bit"); - ui->cbBitDepth->setCurrentIndex(Config::AudioBitDepth); + ui->cbBitDepth->setCurrentIndex(oldBitDepth); bool state = ui->slVolume->blockSignals(true); - ui->slVolume->setValue(Config::AudioVolume); + ui->slVolume->setValue(oldVolume); ui->slVolume->blockSignals(state); - ui->chkSyncDSiVolume->setChecked(Config::DSiVolumeSync); + ui->chkSyncDSiVolume->setChecked(oldDSiSync); // Setup volume slider accordingly if (emuActive && emuInstance->getNDS()->ConsoleType == 1) { - on_chkSyncDSiVolume_clicked(Config::DSiVolumeSync); + on_chkSyncDSiVolume_clicked(oldDSiSync); } else { ui->chkSyncDSiVolume->setEnabled(false); } - bool isext = (Config::MicInputType == 1); + + int mictype = cfg.GetInt("Mic.InputType"); + + bool isext = (mictype == micInputType_External); ui->cbMic->setEnabled(isext); const int count = SDL_GetNumAudioDevices(true); @@ -86,12 +91,14 @@ AudioSettingsDialog::AudioSettingsDialog(QWidget* parent) : QDialog(parent), ui( { ui->cbMic->addItem(SDL_GetAudioDeviceName(i, true)); } - if (Config::MicDevice == "" && count > 0) + + QString micdev = cfg.GetQString("Mic.Device"); + if (micdev == "" && count > 0) { - Config::MicDevice = SDL_GetAudioDeviceName(0, true); + micdev = SDL_GetAudioDeviceName(0, true); } - ui->cbMic->setCurrentText(QString::fromStdString(Config::MicDevice)); + ui->cbMic->setCurrentText(micdev); grpMicMode = new QButtonGroup(this); grpMicMode->addButton(ui->rbMicNone, micInputType_Silence); @@ -99,15 +106,15 @@ AudioSettingsDialog::AudioSettingsDialog(QWidget* parent) : QDialog(parent), ui( grpMicMode->addButton(ui->rbMicNoise, micInputType_Noise); grpMicMode->addButton(ui->rbMicWav, micInputType_Wav); connect(grpMicMode, SIGNAL(buttonClicked(int)), this, SLOT(onChangeMicMode(int))); - grpMicMode->button(Config::MicInputType)->setChecked(true); + grpMicMode->button(mictype)->setChecked(true); - ui->txtMicWavPath->setText(QString::fromStdString(Config::MicWavPath)); + ui->txtMicWavPath->setText(cfg.GetQString("Mic.WavPath")); - bool iswav = (Config::MicInputType == micInputType_Wav); + bool iswav = (mictype == micInputType_Wav); ui->txtMicWavPath->setEnabled(iswav); ui->btnMicWavBrowse->setEnabled(iswav); - int inst = Platform::InstanceID(); + int inst = emuInstance->getInstanceID(); if (inst > 0) { ui->lblInstanceNum->setText(QString("Configuring settings for instance %1").arg(inst+1)); @@ -130,26 +137,30 @@ AudioSettingsDialog::~AudioSettingsDialog() void AudioSettingsDialog::onSyncVolumeLevel() { - if (Config::DSiVolumeSync && emuInstance->getNDS()->ConsoleType == 1) + if (dsiSync && emuInstance->getNDS()->ConsoleType == 1) { auto dsi = static_cast(emuInstance->getNDS()); + volume = dsi->I2C.GetBPTWL()->GetVolumeLevel(); + bool state = ui->slVolume->blockSignals(true); - ui->slVolume->setValue(dsi->I2C.GetBPTWL()->GetVolumeLevel()); + ui->slVolume->setValue(volume); ui->slVolume->blockSignals(state); } } void AudioSettingsDialog::onConsoleReset() { - on_chkSyncDSiVolume_clicked(Config::DSiVolumeSync); + on_chkSyncDSiVolume_clicked(dsiSync); ui->chkSyncDSiVolume->setEnabled(emuInstance->getNDS()->ConsoleType == 1); } void AudioSettingsDialog::on_AudioSettingsDialog_accepted() { - Config::MicDevice = ui->cbMic->currentText().toStdString(); - Config::MicInputType = grpMicMode->checkedId(); - Config::MicWavPath = ui->txtMicWavPath->text().toStdString(); + auto& cfg = emuInstance->getGlobalConfig(); + cfg.SetQString("Mic.Device", ui->cbMic->currentText()); + cfg.SetInt("Mic.InputType", grpMicMode->checkedId()); + cfg.SetQString("Mic.WavPath", ui->txtMicWavPath->text()); + Config::Save(); closeDlg(); @@ -157,10 +168,15 @@ void AudioSettingsDialog::on_AudioSettingsDialog_accepted() void AudioSettingsDialog::on_AudioSettingsDialog_rejected() { - Config::AudioInterp = oldInterp; - Config::AudioBitDepth = oldBitDepth; - Config::AudioVolume = oldVolume; - Config::DSiVolumeSync = oldDSiSync; + auto& cfg = emuInstance->getGlobalConfig(); + auto& instcfg = emuInstance->getLocalConfig(); + cfg.SetInt("Audio.Interpolation", oldInterp); + cfg.SetInt("Audio.BitDepth", oldBitDepth); + instcfg.SetInt("Audio.Volume", oldVolume); + instcfg.SetBool("Audio.DSiVolumeSync", oldDSiSync); + + emit updateAudioVolume(oldVolume, oldDSiSync); + emit updateAudioSettings(); closeDlg(); } @@ -170,7 +186,8 @@ void AudioSettingsDialog::on_cbBitDepth_currentIndexChanged(int idx) // prevent a spurious change if (ui->cbBitDepth->count() < 3) return; - Config::AudioBitDepth = ui->cbBitDepth->currentIndex(); + auto& cfg = emuInstance->getGlobalConfig(); + cfg.SetInt("Audio.BitDepth", ui->cbBitDepth->currentIndex()); emit updateAudioSettings(); } @@ -180,29 +197,37 @@ void AudioSettingsDialog::on_cbInterpolation_currentIndexChanged(int idx) // prevent a spurious change if (ui->cbInterpolation->count() < 5) return; - Config::AudioInterp = ui->cbInterpolation->currentIndex(); + auto& cfg = emuInstance->getGlobalConfig(); + cfg.SetInt("Audio.Interpolation", ui->cbInterpolation->currentIndex()); emit updateAudioSettings(); } void AudioSettingsDialog::on_slVolume_valueChanged(int val) { - if (Config::DSiVolumeSync && emuInstance->getNDS()->ConsoleType == 1) + auto& cfg = emuInstance->getLocalConfig(); + + if (dsiSync && emuInstance->getNDS()->ConsoleType == 1) { auto dsi = static_cast(emuInstance->getNDS()); dsi->I2C.GetBPTWL()->SetVolumeLevel(val); return; } - Config::AudioVolume = val; + volume = val; + cfg.SetInt("Audio.Volume", val); + emit updateAudioVolume(val, dsiSync); } void AudioSettingsDialog::on_chkSyncDSiVolume_clicked(bool checked) { - Config::DSiVolumeSync = checked; + dsiSync = checked; + + auto& cfg = emuInstance->getLocalConfig(); + cfg.SetBool("Audio.DSiVolumeSync", dsiSync); bool state = ui->slVolume->blockSignals(true); - if (Config::DSiVolumeSync && emuInstance->getNDS()->ConsoleType == 1) + if (dsiSync && emuInstance->getNDS()->ConsoleType == 1) { auto dsi = static_cast(emuInstance->getNDS()); ui->slVolume->setMaximum(31); @@ -212,13 +237,16 @@ void AudioSettingsDialog::on_chkSyncDSiVolume_clicked(bool checked) } else { - Config::AudioVolume = oldVolume; + volume = oldVolume; + cfg.SetInt("Audio.Volume", oldVolume); ui->slVolume->setMaximum(256); - ui->slVolume->setValue(Config::AudioVolume); + ui->slVolume->setValue(oldVolume); ui->slVolume->setPageStep(16); ui->slVolume->setTickPosition(QSlider::NoTicks); } ui->slVolume->blockSignals(state); + + emit updateAudioVolume(volume, dsiSync); } void AudioSettingsDialog::onChangeMicMode(int mode) diff --git a/src/frontend/qt_sdl/AudioSettingsDialog.h b/src/frontend/qt_sdl/AudioSettingsDialog.h index 43ad8328..ff3c138f 100644 --- a/src/frontend/qt_sdl/AudioSettingsDialog.h +++ b/src/frontend/qt_sdl/AudioSettingsDialog.h @@ -57,6 +57,7 @@ public: void onConsoleReset(); signals: + void updateAudioVolume(int vol, bool dsisync); void updateAudioSettings(); private slots: @@ -80,6 +81,9 @@ private: int oldVolume; bool oldDSiSync; QButtonGroup* grpMicMode; + + int volume; + bool dsiSync; }; #endif // AUDIOSETTINGSDIALOG_H diff --git a/src/frontend/qt_sdl/Config.h b/src/frontend/qt_sdl/Config.h index 4e04acfb..fb3eb9a1 100644 --- a/src/frontend/qt_sdl/Config.h +++ b/src/frontend/qt_sdl/Config.h @@ -244,14 +244,6 @@ extern bool DirectLAN; extern bool SavestateRelocSRAM; -extern int AudioInterp; -extern int AudioBitDepth; -extern int AudioVolume; -extern bool DSiVolumeSync; -extern int MicInputType; -extern std::string MicDevice; -extern std::string MicWavPath; - extern std::string LastROMFolder; extern std::string RecentROMList[10]; diff --git a/src/frontend/qt_sdl/EmuInstance.cpp b/src/frontend/qt_sdl/EmuInstance.cpp index 2494139e..5a234995 100644 --- a/src/frontend/qt_sdl/EmuInstance.cpp +++ b/src/frontend/qt_sdl/EmuInstance.cpp @@ -987,8 +987,8 @@ bool EmuInstance::updateConsole(UpdateConsoleNDSArgs&& _ndsargs, UpdateConsoleGB std::move(arm7bios), std::move(*firmware), jitargs, - static_cast(Config::AudioBitDepth), - static_cast(Config::AudioInterp), + static_cast(globalCfg.GetInt("Audio.BitDepth")), + static_cast(globalCfg.GetInt("Audio.Interpolation")), gdbargs, }; diff --git a/src/frontend/qt_sdl/EmuInstance.h b/src/frontend/qt_sdl/EmuInstance.h index fe9587d5..9c031d7a 100644 --- a/src/frontend/qt_sdl/EmuInstance.h +++ b/src/frontend/qt_sdl/EmuInstance.h @@ -39,6 +39,9 @@ public: EmuThread* getEmuThread() { return emuThread; } melonDS::NDS* getNDS() { return nds; } + Config::Table& getGlobalConfig() { return globalCfg; } + Config::Table& getLocalConfig() { return localCfg; } + void createWindow(); // return: empty string = setup OK, non-empty = error message @@ -182,6 +185,13 @@ private: melonDS::u32 micBufferLength; melonDS::u32 micBufferReadPos; + //int audioInterp; + int audioVolume; + bool audioDSiVolumeSync; + int micInputType; + std::string micDeviceName; + std::string micWavPath; + friend class EmuThread; friend class MainWindow; }; diff --git a/src/frontend/qt_sdl/EmuInstanceAudio.cpp b/src/frontend/qt_sdl/EmuInstanceAudio.cpp index a9689703..3deb8a07 100644 --- a/src/frontend/qt_sdl/EmuInstanceAudio.cpp +++ b/src/frontend/qt_sdl/EmuInstanceAudio.cpp @@ -91,7 +91,7 @@ void EmuInstance::audioCallback(void* data, Uint8* stream, int len) num_in = len_in-margin; } - inst->audioResample(buf_in, num_in, (s16*)stream, len, Config::AudioVolume); + inst->audioResample(buf_in, num_in, (s16*)stream, len, inst->audioVolume); } void EmuInstance::micCallback(void* data, Uint8* stream, int len) @@ -139,7 +139,7 @@ void EmuInstance::audioMute() void EmuInstance::micOpen() { - if (Config::MicInputType != micInputType_External) + if (micInputType != micInputType_External) { micDevice = 0; return; @@ -158,9 +158,9 @@ void EmuInstance::micOpen() whatIwant.callback = micCallback; whatIwant.userdata = this; const char* mic = NULL; - if (Config::MicDevice != "") + if (micDeviceName != "") { - mic = Config::MicDevice.c_str(); + mic = micDeviceName.c_str(); } micDevice = SDL_OpenAudioDevice(mic, 1, &whatIwant, &whatIget, 0); if (!micDevice) @@ -264,7 +264,7 @@ void EmuInstance::micLoadWav(const std::string& name) void EmuInstance::micProcess() { - int type = Config::MicInputType; + int type = micInputType; bool cmd = Input::HotkeyDown(HK_Mic); if (type != micInputType_External && !cmd) @@ -335,7 +335,11 @@ void EmuInstance::setupMicInputData() micWavLength = 0; } - switch (Config::MicInputType) + micInputType = globalCfg.GetInt("Mic.InputType"); + micDeviceName = globalCfg.GetString("Mic.Device"); + micWavPath = globalCfg.GetString("Mic.WavPath"); + + switch (micInputType) { case micInputType_Silence: case micInputType_Noise: @@ -347,7 +351,7 @@ void EmuInstance::setupMicInputData() micBufferLength = sizeof(micExtBuffer)/sizeof(s16); break; case micInputType_Wav: - micLoadWav(Config::MicWavPath); + micLoadWav(micWavPath); micBuffer = micWavBuffer; micBufferLength = micWavLength; break; @@ -358,6 +362,9 @@ void EmuInstance::setupMicInputData() void EmuInstance::audioInit() { + audioVolume = localCfg.GetInt("Audio.Volume"); + audioDSiVolumeSync = localCfg.GetBool("Audio.DSiVolumeSync"); + audioMuted = false; audioSyncCond = SDL_CreateCond(); audioSyncLock = SDL_CreateMutex(); @@ -432,7 +439,8 @@ void EmuInstance::audioUpdateSettings() { micClose(); - nds->SPU.SetInterpolation(static_cast(Config::AudioInterp)); + int audiointerp = globalCfg.GetInt("Audio.Interpolation"); + nds->SPU.SetInterpolation(static_cast(audiointerp)); setupMicInputData(); micOpen(); diff --git a/src/frontend/qt_sdl/EmuSettingsDialog.cpp b/src/frontend/qt_sdl/EmuSettingsDialog.cpp index 9696d11e..8d4f098e 100644 --- a/src/frontend/qt_sdl/EmuSettingsDialog.cpp +++ b/src/frontend/qt_sdl/EmuSettingsDialog.cpp @@ -16,11 +16,8 @@ with melonDS. If not, see http://www.gnu.org/licenses/. */ -#include #include #include -#include -#include #include "types.h" #include "Platform.h" @@ -28,6 +25,7 @@ #include "EmuSettingsDialog.h" #include "ui_EmuSettingsDialog.h" +#include "main.h" using namespace melonDS::Platform; using namespace melonDS; @@ -59,8 +57,9 @@ EmuSettingsDialog::EmuSettingsDialog(QWidget* parent) : QDialog(parent), ui(new ui->setupUi(this); setAttribute(Qt::WA_DeleteOnClose); - Config::Table cfg = Config::GetGlobalTable(); - Config::Table instcfg = Config::GetLocalTable(Platform::InstanceID()); + emuInstance = ((MainWindow*)parent)->getEmuInstance(); + auto& cfg = emuInstance->getGlobalConfig(); + auto& instcfg = emuInstance->getLocalConfig(); lastBIOSFolder = cfg.GetQString("LastBIOSFolder"); @@ -253,8 +252,8 @@ void EmuSettingsDialog::done(int r) QMessageBox::Ok, QMessageBox::Cancel) != QMessageBox::Ok) return; - Config::Table cfg = Config::GetGlobalTable(); - Config::Table instcfg = Config::GetLocalTable(Platform::InstanceID()); + auto& cfg = emuInstance->getGlobalConfig(); + auto& instcfg = emuInstance->getLocalConfig(); cfg.SetBool("Emu.ExternalBIOSEnable", ui->chkExternalBIOS->isChecked()); cfg.SetQString("DS.BIOS9Path", ui->txtBIOS9Path->text()); diff --git a/src/frontend/qt_sdl/EmuSettingsDialog.h b/src/frontend/qt_sdl/EmuSettingsDialog.h index 6c020718..1d4995e5 100644 --- a/src/frontend/qt_sdl/EmuSettingsDialog.h +++ b/src/frontend/qt_sdl/EmuSettingsDialog.h @@ -24,6 +24,8 @@ namespace Ui { class EmuSettingsDialog; } class EmuSettingsDialog; +class EmuInstance; + class EmuSettingsDialog : public QDialog { Q_OBJECT @@ -84,6 +86,7 @@ private: void updateLastBIOSFolder(QString& filename); Ui::EmuSettingsDialog* ui; + EmuInstance* emuInstance; QString lastBIOSFolder; }; diff --git a/src/frontend/qt_sdl/EmuThread.cpp b/src/frontend/qt_sdl/EmuThread.cpp index 36c17a98..83d02b15 100644 --- a/src/frontend/qt_sdl/EmuThread.cpp +++ b/src/frontend/qt_sdl/EmuThread.cpp @@ -397,7 +397,7 @@ void EmuThread::run() window->setGLSwapInterval(0); } - if (Config::DSiVolumeSync && emuInstance->nds->ConsoleType == 1) + if (emuInstance->audioDSiVolumeSync && emuInstance->nds->ConsoleType == 1) { DSi* dsi = static_cast(emuInstance->nds); u8 volumeLevel = dsi->I2C.GetBPTWL()->GetVolumeLevel(); @@ -407,7 +407,7 @@ void EmuThread::run() emit syncVolumeLevel(); } - Config::AudioVolume = volumeLevel * (256.0 / 31.0); + emuInstance->audioVolume = volumeLevel * (256.0 / 31.0); } if (Config::AudioSync && !fastforward) diff --git a/src/frontend/qt_sdl/Window.cpp b/src/frontend/qt_sdl/Window.cpp index 1a2ffb3b..50c11515 100644 --- a/src/frontend/qt_sdl/Window.cpp +++ b/src/frontend/qt_sdl/Window.cpp @@ -198,10 +198,12 @@ static void signalHandler(int) int test = 0; -MainWindow::MainWindow(EmuInstance* inst, QWidget* parent) : QMainWindow(parent) +MainWindow::MainWindow(EmuInstance* inst, QWidget* parent) : + QMainWindow(parent), + emuInstance(inst), + globalCfg(inst->globalCfg), + localCfg(inst->localCfg) { - emuInstance = inst; - test_num = test++; #ifndef _WIN32 if (!parent) @@ -1767,6 +1769,7 @@ void MainWindow::onOpenAudioSettings() AudioSettingsDialog* dlg = AudioSettingsDialog::openDlg(this); connect(emuThread, &EmuThread::syncVolumeLevel, dlg, &AudioSettingsDialog::onSyncVolumeLevel); connect(emuThread, &EmuThread::windowEmuStart, dlg, &AudioSettingsDialog::onConsoleReset); + connect(dlg, &AudioSettingsDialog::updateAudioVolume, this, &MainWindow::onUpdateAudioVolume); connect(dlg, &AudioSettingsDialog::updateAudioSettings, this, &MainWindow::onUpdateAudioSettings); connect(dlg, &AudioSettingsDialog::finished, this, &MainWindow::onAudioSettingsFinished); } @@ -1803,15 +1806,24 @@ void MainWindow::onPathSettingsFinished(int res) emuThread->emuUnpause(); } +void MainWindow::onUpdateAudioVolume(int vol, int dsisync) +{ + emuInstance->audioVolume = vol; + emuInstance->audioDSiVolumeSync = dsisync; +} + void MainWindow::onUpdateAudioSettings() { assert(emuInstance->nds != nullptr); - emuInstance->nds->SPU.SetInterpolation(static_cast(Config::AudioInterp)); - if (Config::AudioBitDepth == 0) + int interp = globalCfg.GetInt("Audio.Interpolation"); + emuInstance->nds->SPU.SetInterpolation(static_cast(interp)); + + int bitdepth = globalCfg.GetInt("Audio.BitDepth"); + if (bitdepth == 0) emuInstance->nds->SPU.SetDegrade10Bit(emuInstance->nds->ConsoleType == 0); else - emuInstance->nds->SPU.SetDegrade10Bit(Config::AudioBitDepth == 1); + emuInstance->nds->SPU.SetDegrade10Bit(bitdepth == 1); } void MainWindow::onAudioSettingsFinished(int res) diff --git a/src/frontend/qt_sdl/Window.h b/src/frontend/qt_sdl/Window.h index 47adc0f0..80e228e1 100644 --- a/src/frontend/qt_sdl/Window.h +++ b/src/frontend/qt_sdl/Window.h @@ -34,6 +34,7 @@ #include #include "Screen.h" +#include "Config.h" class EmuInstance; @@ -177,6 +178,7 @@ private slots: void onOpenCameraSettings(); void onCameraSettingsFinished(int res); void onOpenAudioSettings(); + void onUpdateAudioVolume(int vol, int dsisync); void onUpdateAudioSettings(); void onAudioSettingsFinished(int res); void onOpenMPSettings(); @@ -240,9 +242,11 @@ private: int test_num; EmuInstance* emuInstance; - EmuThread* emuThread; + Config::Table& globalCfg; + Config::Table& localCfg; + public: ScreenPanel* panel; diff --git a/src/frontend/qt_sdl/main.cpp b/src/frontend/qt_sdl/main.cpp index f9f1b78c..326ad99b 100644 --- a/src/frontend/qt_sdl/main.cpp +++ b/src/frontend/qt_sdl/main.cpp @@ -347,9 +347,6 @@ int main(int argc, char** argv) #endif SANITIZE(Config::ScreenVSyncInterval, 1, 20); SANITIZE(Config::GL_ScaleFactor, 1, 16); - SANITIZE(Config::AudioInterp, 0, 4); - SANITIZE(Config::AudioVolume, 0, 256); - SANITIZE(Config::MicInputType, 0, (int)micInputType_MAX); SANITIZE(Config::ScreenRotation, 0, (int)Frontend::screenRot_MAX); SANITIZE(Config::ScreenGap, 0, 500); SANITIZE(Config::ScreenLayout, 0, (int)Frontend::screenLayout_MAX);