From 6ca2da53e86766f54df1ae79e65bb220b41ed7ef Mon Sep 17 00:00:00 2001 From: JosJuice Date: Tue, 2 Jul 2024 17:27:04 +0200 Subject: Partially revert "Revert "Audit uses of IsRunning and GetState"" This reverts the revert commit bc67fc97c39628c76a4dbca411b0e8a9bfaf726a, except for the changes in BaseConfigLoader.cpp, which caused the bug that made us revert 72cf2bdb87f09deff22e1085de3290126aa4ad05. PR 12917 contains an improved change to BaseConfigLoader.cpp, which can be merged (or rejected) independently. A few changes have also been made based on review comments. --- Source/Core/DolphinQt/Config/Graphics/GeneralWidget.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Source/Core/DolphinQt/Config/Graphics/GeneralWidget.cpp') diff --git a/Source/Core/DolphinQt/Config/Graphics/GeneralWidget.cpp b/Source/Core/DolphinQt/Config/Graphics/GeneralWidget.cpp index 52f09a6f41..3574e6893a 100644 --- a/Source/Core/DolphinQt/Config/Graphics/GeneralWidget.cpp +++ b/Source/Core/DolphinQt/Config/Graphics/GeneralWidget.cpp @@ -44,8 +44,7 @@ GeneralWidget::GeneralWidget(GraphicsWindow* parent) connect(&Settings::Instance(), &Settings::EmulationStateChanged, this, [this](Core::State state) { OnEmulationStateChanged(state != Core::State::Uninitialized); }); - OnEmulationStateChanged(Core::GetState(Core::System::GetInstance()) != - Core::State::Uninitialized); + OnEmulationStateChanged(!Core::IsUninitialized(Core::System::GetInstance())); } void GeneralWidget::CreateWidgets() @@ -361,7 +360,8 @@ 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 && !Core::IsRunning(Core::System::GetInstance())); + m_adapter_combo->setEnabled(supports_adapters && + Core::IsUninitialized(Core::System::GetInstance())); static constexpr char TR_ADAPTER_AVAILABLE_DESCRIPTION[] = QT_TR_NOOP("Selects a hardware adapter to use.

" -- cgit v1.2.3