mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-30 04:38:49 +00:00
Merge pull request #7437 from stenzek/graphics-options-race
Fix race condition caused by opening graphics options while running
This commit is contained in:
commit
ecd4897d43
15 changed files with 29 additions and 48 deletions
|
@ -313,7 +313,7 @@ void GeneralWidget::OnBackendChanged(const QString& backend_name)
|
|||
const bool supports_adapters = !adapters.empty();
|
||||
|
||||
m_adapter_combo->setCurrentIndex(g_Config.iAdapter);
|
||||
m_adapter_combo->setEnabled(supports_adapters);
|
||||
m_adapter_combo->setEnabled(supports_adapters && !Core::IsRunning());
|
||||
|
||||
m_adapter_combo->setToolTip(supports_adapters ?
|
||||
QStringLiteral("") :
|
||||
|
|
|
@ -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())));
|
||||
|
|
|
@ -150,9 +150,6 @@ bool Host_UINeedsControllerState()
|
|||
{
|
||||
return Settings::Instance().IsControllerStateNeeded();
|
||||
}
|
||||
void Host_ShowVideoConfig(void* parent, const std::string& backend_name)
|
||||
{
|
||||
}
|
||||
void Host_RefreshDSPDebuggerWindow()
|
||||
{
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue