mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-14 21:37:52 -07:00
Qt: Work around broken drivers that don't allow backend switching
This commit is contained in:
parent
1264daae9b
commit
7c5e464584
@ -575,7 +575,21 @@ void MainWindow::HideRenderWidget()
|
||||
disconnect(Host::GetInstance(), &Host::RequestTitle, this, &MainWindow::setWindowTitle);
|
||||
setWindowTitle(QString::fromStdString(Common::scm_rev_str));
|
||||
}
|
||||
|
||||
// The following code works around a driver bug that would lead to Dolphin crashing when changing
|
||||
// graphics backends (e.g. OpenGL to Vulkan). To avoid this the render widget is (safely) recreated
|
||||
disconnect(m_render_widget, &RenderWidget::EscapePressed, this, &MainWindow::RequestStop);
|
||||
disconnect(m_render_widget, &RenderWidget::Closed, this, &MainWindow::ForceStop);
|
||||
|
||||
m_render_widget->hide();
|
||||
m_render_widget->removeEventFilter(this);
|
||||
m_render_widget->deleteLater();
|
||||
|
||||
m_render_widget = new RenderWidget;
|
||||
|
||||
m_render_widget->installEventFilter(this);
|
||||
connect(m_render_widget, &RenderWidget::EscapePressed, this, &MainWindow::RequestStop);
|
||||
connect(m_render_widget, &RenderWidget::Closed, this, &MainWindow::ForceStop);
|
||||
}
|
||||
|
||||
void MainWindow::ShowControllersWindow()
|
||||
|
Loading…
Reference in New Issue
Block a user