all repos — mgba @ 19d0ca3b8b63dd25c17539357d09a47b44d2e6db

mGBA Game Boy Advance Emulator

Qt: Fix crash when changing audio settings after a game is closed
Vicki Pfau vi@endrift.com
Thu, 06 Apr 2017 11:54:13 -0700
commit

19d0ca3b8b63dd25c17539357d09a47b44d2e6db

parent

ee74e4affa976010517ecee674a4f1cac2c9678e

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

jump to
M CHANGESCHANGES

@@ -35,6 +35,7 @@ - SDL: Fix game crash check

- SDL: Fix race condition with audio thread when starting - GB: Fix flickering when screen is strobed quickly - FFmpeg: Fix overflow and general issues with audio encoding + - Qt: Fix crash when changing audio settings after a game is closed Misc: - SDL: Remove scancode key input - GBA Video: Clean up unused timers
M src/platform/qt/GameController.cppsrc/platform/qt/GameController.cpp

@@ -654,6 +654,7 @@ delete[] m_drawContext;

delete[] m_frontBuffer; m_threadContext.core->deinit(m_threadContext.core); + m_threadContext.core = nullptr; m_gameOpen = false; }

@@ -1222,7 +1223,7 @@ }

} void GameController::redoSamples(int samples) { - if (m_threadContext.core) { + if (m_gameOpen && m_threadContext.core) { m_threadContext.core->setAudioBufferSize(m_threadContext.core, samples); } m_audioProcessor->inputParametersChanged();