mirror of https://github.com/mgba-emu/mgba.git
Qt: Tentative fix for renderer switching crash
This commit is contained in:
parent
1127cf8b84
commit
4626cac9e8
|
@ -938,6 +938,11 @@ QOpenGLContext* PainterGL::shareContext() {
|
||||||
void PainterGL::updateFramebufferHandle() {
|
void PainterGL::updateFramebufferHandle() {
|
||||||
QOpenGLFunctions_Baseline* fn = m_gl->versionFunctions<QOpenGLFunctions_Baseline>();
|
QOpenGLFunctions_Baseline* fn = m_gl->versionFunctions<QOpenGLFunctions_Baseline>();
|
||||||
fn->glFinish();
|
fn->glFinish();
|
||||||
|
|
||||||
|
CoreController::Interrupter interrupter(m_context);
|
||||||
|
if (!m_context->hardwareAccelerated()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
enqueue(m_bridgeTexIn);
|
enqueue(m_bridgeTexIn);
|
||||||
m_context->setFramebufferHandle(m_bridgeTexIn);
|
m_context->setFramebufferHandle(m_bridgeTexIn);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1061,6 +1061,8 @@ void Window::changeRenderer() {
|
||||||
if (!m_controller) {
|
if (!m_controller) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
CoreController::Interrupter interrupter(m_controller);
|
||||||
if (m_config->getOption("hwaccelVideo").toInt() && m_display->supportsShaders() && m_controller->supportsFeature(CoreController::Feature::OPENGL)) {
|
if (m_config->getOption("hwaccelVideo").toInt() && m_display->supportsShaders() && m_controller->supportsFeature(CoreController::Feature::OPENGL)) {
|
||||||
std::shared_ptr<VideoProxy> proxy = m_display->videoProxy();
|
std::shared_ptr<VideoProxy> proxy = m_display->videoProxy();
|
||||||
if (!proxy) {
|
if (!proxy) {
|
||||||
|
|
Loading…
Reference in New Issue