mirror of https://github.com/mgba-emu/mgba.git
Qt: Fix crash when changing audio settings after a game is closed
This commit is contained in:
parent
b6bee99ab5
commit
4195c7730b
1
CHANGES
1
CHANGES
|
@ -18,6 +18,7 @@ Bugfixes:
|
||||||
- SDL: Fix game crash check
|
- SDL: Fix game crash check
|
||||||
- SDL: Fix race condition with audio thread when starting
|
- SDL: Fix race condition with audio thread when starting
|
||||||
- FFmpeg: Fix overflow and general issues with audio encoding
|
- FFmpeg: Fix overflow and general issues with audio encoding
|
||||||
|
- Qt: Fix crash when changing audio settings after a game is closed
|
||||||
Misc:
|
Misc:
|
||||||
- Qt: Improved HiDPI support
|
- Qt: Improved HiDPI support
|
||||||
- Feature: Support ImageMagick 7
|
- Feature: Support ImageMagick 7
|
||||||
|
|
|
@ -592,6 +592,7 @@ void GameController::cleanGame() {
|
||||||
delete[] m_frontBuffer;
|
delete[] m_frontBuffer;
|
||||||
|
|
||||||
m_threadContext.core->deinit(m_threadContext.core);
|
m_threadContext.core->deinit(m_threadContext.core);
|
||||||
|
m_threadContext.core = nullptr;
|
||||||
m_gameOpen = false;
|
m_gameOpen = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1158,7 +1159,7 @@ void GameController::updateKeys() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void GameController::redoSamples(int samples) {
|
void GameController::redoSamples(int samples) {
|
||||||
if (m_threadContext.core) {
|
if (m_gameOpen && m_threadContext.core) {
|
||||||
m_threadContext.core->setAudioBufferSize(m_threadContext.core, samples);
|
m_threadContext.core->setAudioBufferSize(m_threadContext.core, samples);
|
||||||
}
|
}
|
||||||
QMetaObject::invokeMethod(m_audioProcessor, "inputParametersChanged");
|
QMetaObject::invokeMethod(m_audioProcessor, "inputParametersChanged");
|
||||||
|
|
Loading…
Reference in New Issue