mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 05:09:34 -06:00
DolphinQt: Make the mapping window clear button use ControllerEmu's clear functionality.
This commit is contained in:
@ -143,7 +143,7 @@ void MappingWindow::ConnectWidgets()
|
||||
connect(m_devices_refresh, &QPushButton::clicked, this, &MappingWindow::RefreshDevices);
|
||||
connect(m_devices_combo, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged),
|
||||
this, &MappingWindow::OnDeviceChanged);
|
||||
connect(m_reset_clear, &QPushButton::clicked, this, [this] { emit ClearFields(); });
|
||||
connect(m_reset_clear, &QPushButton::clicked, this, &MappingWindow::OnClearFieldsPressed);
|
||||
connect(m_reset_default, &QPushButton::clicked, this, &MappingWindow::OnDefaultFieldsPressed);
|
||||
connect(m_profiles_save, &QPushButton::clicked, this, &MappingWindow::OnSaveProfilePressed);
|
||||
connect(m_profiles_load, &QPushButton::clicked, this, &MappingWindow::OnLoadProfilePressed);
|
||||
@ -380,6 +380,16 @@ void MappingWindow::OnDefaultFieldsPressed()
|
||||
emit Save();
|
||||
}
|
||||
|
||||
void MappingWindow::OnClearFieldsPressed()
|
||||
{
|
||||
// Loading an empty inifile section clears everything.
|
||||
IniFile::Section sec;
|
||||
m_controller->LoadConfig(&sec);
|
||||
m_controller->UpdateReferences(g_controller_interface);
|
||||
emit Update();
|
||||
emit Save();
|
||||
}
|
||||
|
||||
bool MappingWindow::IsIterativeInput() const
|
||||
{
|
||||
return m_iterative_input->isChecked();
|
||||
|
Reference in New Issue
Block a user