mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-08-12 19:19:03 +00:00
Partially revert "Revert "Audit uses of IsRunning and GetState""
This reverts the revert commitbc67fc97c3
, except for the changes in BaseConfigLoader.cpp, which caused the bug that made us revert72cf2bdb87
. 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.
This commit is contained in:
parent
2da3e49b1e
commit
6ca2da53e8
33 changed files with 143 additions and 114 deletions
|
@ -43,8 +43,7 @@ AdvancedWidget::AdvancedWidget(GraphicsWindow* parent)
|
|||
});
|
||||
|
||||
OnBackendChanged();
|
||||
OnEmulationStateChanged(Core::GetState(Core::System::GetInstance()) !=
|
||||
Core::State::Uninitialized);
|
||||
OnEmulationStateChanged(!Core::IsUninitialized(Core::System::GetInstance()));
|
||||
}
|
||||
|
||||
void AdvancedWidget::CreateWidgets()
|
||||
|
|
|
@ -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.<br><br>"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue