mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-25 07:09:48 -06:00
Core::GetState: Avoid Global System Accessor
This commit is contained in:
@ -240,7 +240,7 @@ void AdvancedPane::ConnectLayout()
|
||||
|
||||
void AdvancedPane::Update()
|
||||
{
|
||||
const bool running = Core::GetState() != Core::State::Uninitialized;
|
||||
const bool running = Core::GetState(Core::System::GetInstance()) != Core::State::Uninitialized;
|
||||
const bool enable_cpu_clock_override_widgets = Config::Get(Config::MAIN_OVERCLOCK_ENABLE);
|
||||
const bool enable_ram_override_widgets = Config::Get(Config::MAIN_RAM_OVERRIDE_ENABLE);
|
||||
const bool enable_custom_rtc_widgets = Config::Get(Config::MAIN_CUSTOM_RTC_ENABLE) && !running;
|
||||
|
@ -40,7 +40,8 @@ AudioPane::AudioPane()
|
||||
OnEmulationStateChanged(state != Core::State::Uninitialized);
|
||||
});
|
||||
|
||||
OnEmulationStateChanged(Core::GetState() != Core::State::Uninitialized);
|
||||
OnEmulationStateChanged(Core::GetState(Core::System::GetInstance()) !=
|
||||
Core::State::Uninitialized);
|
||||
}
|
||||
|
||||
void AudioPane::CreateWidgets()
|
||||
|
@ -22,6 +22,7 @@
|
||||
#include "Core/Core.h"
|
||||
#include "Core/DolphinAnalytics.h"
|
||||
#include "Core/PowerPC/PowerPC.h"
|
||||
#include "Core/System.h"
|
||||
|
||||
#include "DolphinQt/QtUtils/ModalMessageBox.h"
|
||||
#include "DolphinQt/QtUtils/NonDefaultQPushButton.h"
|
||||
@ -58,7 +59,7 @@ GeneralPane::GeneralPane(QWidget* parent) : QWidget(parent)
|
||||
&GeneralPane::OnEmulationStateChanged);
|
||||
connect(&Settings::Instance(), &Settings::ConfigChanged, this, &GeneralPane::LoadConfig);
|
||||
|
||||
OnEmulationStateChanged(Core::GetState());
|
||||
OnEmulationStateChanged(Core::GetState(Core::System::GetInstance()));
|
||||
}
|
||||
|
||||
void GeneralPane::CreateLayout()
|
||||
|
@ -30,6 +30,7 @@
|
||||
#include "Core/Config/SYSCONFSettings.h"
|
||||
#include "Core/ConfigManager.h"
|
||||
#include "Core/Core.h"
|
||||
#include "Core/System.h"
|
||||
|
||||
#include "DolphinQt/QtUtils/DolphinFileDialog.h"
|
||||
#include "DolphinQt/QtUtils/ModalMessageBox.h"
|
||||
@ -92,7 +93,8 @@ WiiPane::WiiPane(QWidget* parent) : QWidget(parent)
|
||||
LoadConfig();
|
||||
ConnectLayout();
|
||||
ValidateSelectionState();
|
||||
OnEmulationStateChanged(Core::GetState() != Core::State::Uninitialized);
|
||||
OnEmulationStateChanged(Core::GetState(Core::System::GetInstance()) !=
|
||||
Core::State::Uninitialized);
|
||||
}
|
||||
|
||||
void WiiPane::CreateLayout()
|
||||
|
Reference in New Issue
Block a user