all repos — mgba @ 740f733563fec161f7ca7d3222ddb9100a95f869

mGBA Game Boy Advance Emulator

Qt: Change audio driver back to SDL by default
Jeffrey Pfau jeffrey@endrift.com
Mon, 23 Mar 2015 21:34:20 -0700
commit

740f733563fec161f7ca7d3222ddb9100a95f869

parent

1c422d405726f4c93ef11df4bd99fe398fa8d097

2 files changed, 4 insertions(+), 4 deletions(-)

jump to
M src/platform/qt/AudioProcessor.cppsrc/platform/qt/AudioProcessor.cpp

@@ -19,7 +19,7 @@ }

using namespace QGBA; -#ifdef BUILD_QT_MULTIMEDIA +#ifndef BUILD_SDL AudioProcessor::Driver AudioProcessor::s_driver = AudioProcessor::Driver::QT_MULTIMEDIA; #else AudioProcessor::Driver AudioProcessor::s_driver = AudioProcessor::Driver::SDL;
M src/platform/qt/SettingsView.cppsrc/platform/qt/SettingsView.cpp

@@ -42,17 +42,17 @@ } else if (idleOptimization == "detect") {

m_ui.idleOptimization->setCurrentIndex(2); } - int audioDriver = m_controller->getQtOption("audioDriver").toInt(); + QVariant audioDriver = m_controller->getQtOption("audioDriver"); #ifdef BUILD_QT_MULTIMEDIA m_ui.audioDriver->addItem(tr("Qt Multimedia"), static_cast<int>(AudioProcessor::Driver::QT_MULTIMEDIA)); - if (audioDriver == static_cast<int>(AudioProcessor::Driver::QT_MULTIMEDIA)) { + if (!audioDriver.isNull() && audioDriver.toInt() == static_cast<int>(AudioProcessor::Driver::QT_MULTIMEDIA)) { m_ui.audioDriver->setCurrentIndex(m_ui.audioDriver->count() - 1); } #endif #ifdef BUILD_SDL m_ui.audioDriver->addItem(tr("SDL"), static_cast<int>(AudioProcessor::Driver::SDL)); - if (audioDriver == static_cast<int>(AudioProcessor::Driver::SDL)) { + if (audioDriver.isNull() || audioDriver.toInt() == static_cast<int>(AudioProcessor::Driver::SDL)) { m_ui.audioDriver->setCurrentIndex(m_ui.audioDriver->count() - 1); } #endif