mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-01-30 21:32:50 +00:00
Qt/Input: Properly clear pad selection in pad settings
Fixes a rare issue that causes a newly selected pad handler with no pads to try to connect a previously selected pad from another handler.
This commit is contained in:
parent
871ef2cdfe
commit
cb8a240f1a
@ -1443,7 +1443,7 @@ void pad_settings_dialog::ChangeHandler()
|
|||||||
ui->chooseDevice->blockSignals(false);
|
ui->chooseDevice->blockSignals(false);
|
||||||
|
|
||||||
// Handle empty device list
|
// Handle empty device list
|
||||||
bool config_enabled = force_enable || (m_handler->m_type != pad_handler::null && ui->chooseDevice->count() > 0);
|
const bool config_enabled = force_enable || (m_handler->m_type != pad_handler::null && ui->chooseDevice->count() > 0);
|
||||||
|
|
||||||
if (config_enabled)
|
if (config_enabled)
|
||||||
{
|
{
|
||||||
@ -1454,9 +1454,15 @@ void pad_settings_dialog::ChangeHandler()
|
|||||||
if (pad_device_info info = get_pad_info(ui->chooseDevice, i); info.name == device)
|
if (pad_device_info info = get_pad_info(ui->chooseDevice, i); info.name == device)
|
||||||
{
|
{
|
||||||
ui->chooseDevice->setCurrentIndex(i);
|
ui->chooseDevice->setCurrentIndex(i);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (ui->chooseDevice->currentIndex() < 0 && ui->chooseDevice->count() > 0)
|
||||||
|
{
|
||||||
|
ui->chooseDevice->setCurrentIndex(0);
|
||||||
|
}
|
||||||
|
|
||||||
// Force Refresh
|
// Force Refresh
|
||||||
ChangeDevice(ui->chooseDevice->currentIndex());
|
ChangeDevice(ui->chooseDevice->currentIndex());
|
||||||
}
|
}
|
||||||
@ -1466,6 +1472,8 @@ void pad_settings_dialog::ChangeHandler()
|
|||||||
{
|
{
|
||||||
ui->chooseDevice->setPlaceholderText(tr("No Device Detected"));
|
ui->chooseDevice->setPlaceholderText(tr("No Device Detected"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
m_device_name.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Handle running timers
|
// Handle running timers
|
||||||
|
Loading…
x
Reference in New Issue
Block a user