Merge pull request #6353 from spycrab/qt_fix_invdev

Qt/MappingWindow: Fix invalid device being selected by default
This commit is contained in:
Léo Lam 2018-02-04 12:54:14 +01:00 committed by GitHub
commit 44391ad2fe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -224,7 +224,8 @@ void MappingWindow::RefreshDevices()
const auto default_device = m_controller->GetDefaultDevice().ToString();
m_devices_combo->addItem(QString::fromStdString(default_device));
if (!default_device.empty())
m_devices_combo->addItem(QString::fromStdString(default_device));
for (const auto& name : g_controller_interface.GetAllDeviceStrings())
{