mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-10-05 23:59:05 +00:00
Core::IsRunning: Avoid Global System Accessor
This commit is contained in:
parent
b71fdef356
commit
0df401b164
25 changed files with 90 additions and 74 deletions
|
@ -191,16 +191,16 @@ void GamecubeControllersWidget::SaveSettings()
|
|||
{
|
||||
Config::ConfigChangeCallbackGuard config_guard;
|
||||
|
||||
auto& system = Core::System::GetInstance();
|
||||
for (size_t i = 0; i < m_gc_groups.size(); ++i)
|
||||
{
|
||||
const SerialInterface::SIDevices si_device =
|
||||
FromGCMenuIndex(m_gc_controller_boxes[i]->currentIndex());
|
||||
Config::SetBaseOrCurrent(Config::GetInfoForSIDevice(static_cast<int>(i)), si_device);
|
||||
|
||||
if (Core::IsRunning())
|
||||
if (Core::IsRunning(system))
|
||||
{
|
||||
Core::System::GetInstance().GetSerialInterface().ChangeDevice(si_device,
|
||||
static_cast<s32>(i));
|
||||
system.GetSerialInterface().ChangeDevice(si_device, static_cast<s32>(i));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue