Qt: Fix SDL audio crash
Jeffrey Pfau jeffrey@endrift.com
Sat, 13 Feb 2016 01:17:17 -0800
1 files changed,
5 insertions(+),
1 deletions(-)
M
src/platform/qt/AudioProcessorSDL.cpp
→
src/platform/qt/AudioProcessorSDL.cpp
@@ -7,6 +7,10 @@ #include "AudioProcessorSDL.h"
#include "LogController.h" +extern "C" { +#include "core/thread.h" +} + using namespace QGBA; AudioProcessorSDL::AudioProcessorSDL(QObject* parent)@@ -21,7 +25,7 @@ }
void AudioProcessorSDL::setInput(mCoreThread* input) { AudioProcessor::setInput(input); - if (m_audio.core) { + if (m_audio.core && input->core != m_audio.core) { mSDLDeinitAudio(&m_audio); mSDLInitAudio(&m_audio, input); }