all repos — mgba @ b92482520c5361a1f9551d667ad662b4e4a1f57b

mGBA Game Boy Advance Emulator

Qt: Fix SDL audio crash
Jeffrey Pfau jeffrey@endrift.com
Sat, 13 Feb 2016 01:17:17 -0800
commit

b92482520c5361a1f9551d667ad662b4e4a1f57b

parent

f3daa19a6dc58773d5f1d76e3b2d3d21fa9449c5

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

jump to
M src/platform/qt/AudioProcessorSDL.cppsrc/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); }