This commit is contained in:
Nayla Hanegan 2024-05-12 02:17:59 -04:00
commit 98c174edc4
520 changed files with 74815 additions and 58942 deletions

View file

@ -66,10 +66,10 @@ GamecubeControllersWidget::GamecubeControllersWidget(QWidget* parent) : QWidget(
ConnectWidgets();
connect(&Settings::Instance(), &Settings::ConfigChanged, this,
[this] { LoadSettings(Core::GetState()); });
[this] { LoadSettings(Core::GetState(Core::System::GetInstance())); });
connect(&Settings::Instance(), &Settings::EmulationStateChanged, this,
[this](Core::State state) { LoadSettings(state); });
LoadSettings(Core::GetState());
LoadSettings(Core::GetState(Core::System::GetInstance()));
}
void GamecubeControllersWidget::CreateLayout()
@ -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));
}
}
}