all repos — mgba @ 92d5ebf2f490b52f778a752c79abdaf37022f368

mGBA Game Boy Advance Emulator

Qt: Ensure audio processor is only set if one is present in config
Jeffrey Pfau jeffrey@endrift.com
Sun, 16 Aug 2015 19:56:45 -0700
commit

92d5ebf2f490b52f778a752c79abdaf37022f368

parent

6d5d11b0748b3cf885b59ca6600abd1daf291d71

1 files changed, 3 insertions(+), 1 deletions(-)

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

@@ -57,7 +57,9 @@ ::exit(0);

return; } - AudioProcessor::setDriver(static_cast<AudioProcessor::Driver>(m_configController.getQtOption("audioDriver").toInt())); + if (!m_configController.getQtOption("audioDriver").isNull()) { + AudioProcessor::setDriver(static_cast<AudioProcessor::Driver>(m_configController.getQtOption("audioDriver").toInt())); + } Window* w = new Window(&m_configController); connect(w, &Window::destroyed, [this]() { m_windows[0] = nullptr;