mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-06-11 16:49:28 +02:00
Migrate video backend setting to the new config system
Fixes https://bugs.dolphin-emu.org/issues/12087
This commit is contained in:
@ -12,6 +12,7 @@
|
||||
#include <QVBoxLayout>
|
||||
|
||||
#include "Core/Config/GraphicsSettings.h"
|
||||
#include "Core/Config/MainSettings.h"
|
||||
#include "Core/ConfigManager.h"
|
||||
#include "Core/Core.h"
|
||||
|
||||
@ -30,7 +31,7 @@ SoftwareRendererWidget::SoftwareRendererWidget(GraphicsWindow* parent) : Graphic
|
||||
LoadSettings();
|
||||
ConnectWidgets();
|
||||
AddDescriptions();
|
||||
emit BackendChanged(QString::fromStdString(SConfig::GetInstance().m_strVideoBackend));
|
||||
emit BackendChanged(QString::fromStdString(Config::Get(Config::MAIN_GFX_BACKEND)));
|
||||
|
||||
connect(parent, &GraphicsWindow::BackendChanged, [this] { LoadSettings(); });
|
||||
connect(&Settings::Instance(), &Settings::EmulationStateChanged, this,
|
||||
@ -123,9 +124,11 @@ void SoftwareRendererWidget::LoadSettings()
|
||||
{
|
||||
for (const auto& backend : g_available_video_backends)
|
||||
{
|
||||
if (backend->GetName() == SConfig::GetInstance().m_strVideoBackend)
|
||||
if (backend->GetName() == Config::Get(Config::MAIN_GFX_BACKEND))
|
||||
{
|
||||
m_backend_combo->setCurrentIndex(
|
||||
m_backend_combo->findText(tr(backend->GetDisplayName().c_str())));
|
||||
}
|
||||
}
|
||||
|
||||
m_object_range_min->setValue(Config::Get(Config::GFX_SW_DRAW_START));
|
||||
@ -139,7 +142,7 @@ void SoftwareRendererWidget::SaveSettings()
|
||||
if (tr(backend->GetDisplayName().c_str()) == m_backend_combo->currentText())
|
||||
{
|
||||
const auto backend_name = backend->GetName();
|
||||
if (backend_name != SConfig::GetInstance().m_strVideoBackend)
|
||||
if (backend_name != Config::Get(Config::MAIN_GFX_BACKEND))
|
||||
emit BackendChanged(QString::fromStdString(backend_name));
|
||||
break;
|
||||
}
|
||||
|
Reference in New Issue
Block a user