mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 05:09:34 -06:00
Don't fill backend info when core is running
The current approach results in the UI thread creating a graphics device whilst the core is running, leading to races on function pointers, and potentially crashing.
This commit is contained in:
@ -38,9 +38,6 @@ void GraphicsWindow::Initialize()
|
||||
|
||||
m_lazy_initialized = true;
|
||||
|
||||
g_Config.Refresh();
|
||||
g_video_backend->InitBackendInfo();
|
||||
|
||||
CreateMainLayout();
|
||||
|
||||
setWindowTitle(tr("Graphics"));
|
||||
@ -109,18 +106,7 @@ void GraphicsWindow::CreateMainLayout()
|
||||
void GraphicsWindow::OnBackendChanged(const QString& backend_name)
|
||||
{
|
||||
SConfig::GetInstance().m_strVideoBackend = backend_name.toStdString();
|
||||
|
||||
for (const auto& backend : g_available_video_backends)
|
||||
{
|
||||
if (backend->GetName() == backend_name.toStdString())
|
||||
{
|
||||
g_Config.Refresh();
|
||||
|
||||
g_video_backend = backend.get();
|
||||
g_video_backend->InitBackendInfo();
|
||||
break;
|
||||
}
|
||||
}
|
||||
VideoBackendBase::PopulateBackendInfo();
|
||||
|
||||
setWindowTitle(
|
||||
tr("%1 Graphics Configuration").arg(tr(g_video_backend->GetDisplayName().c_str())));
|
||||
|
Reference in New Issue
Block a user