mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-22 22:00:39 -06: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:
@ -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>"
|
||||
|
Reference in New Issue
Block a user