mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06:00
Qt/Mapping: Add option to map all devices at once
This commit is contained in:
@ -222,10 +222,18 @@ void MappingWindow::OnSaveProfilePressed()
|
||||
|
||||
void MappingWindow::OnDeviceChanged(int index)
|
||||
{
|
||||
if (IsMappingAllDevices())
|
||||
return;
|
||||
|
||||
const auto device = m_devices_combo->currentText().toStdString();
|
||||
m_controller->SetDefaultDevice(device);
|
||||
}
|
||||
|
||||
bool MappingWindow::IsMappingAllDevices() const
|
||||
{
|
||||
return m_devices_combo->currentIndex() == m_devices_combo->count() - 1;
|
||||
}
|
||||
|
||||
void MappingWindow::RefreshDevices()
|
||||
{
|
||||
m_devices_combo->clear();
|
||||
@ -245,6 +253,8 @@ void MappingWindow::RefreshDevices()
|
||||
m_devices_combo->addItem(QString::fromStdString(name));
|
||||
}
|
||||
|
||||
m_devices_combo->addItem(tr("All devices"));
|
||||
|
||||
m_devices_combo->setCurrentIndex(0);
|
||||
});
|
||||
}
|
||||
|
Reference in New Issue
Block a user