mirror of
https://github.com/RPCS3/rpcs3.git
synced 2026-03-11 16:05:23 +01:00
Fix update_list: Improve connection status label updates for Wiimote list
This commit is contained in:
parent
4b53c173d6
commit
7a3e056395
|
|
@ -286,13 +286,13 @@ void wiimote_settings_dialog::update_list()
|
|||
}
|
||||
else
|
||||
{
|
||||
// Just update connection status labels without clearing
|
||||
for (usz i = 0; i < states.size(); i++)
|
||||
for (usz i = 0; i < std::min(static_cast<usz>(ui->wiimoteList->count()), states.size()); i++)
|
||||
{
|
||||
QListWidgetItem* item = ui->wiimoteList->item(static_cast<int>(i));
|
||||
if (!item) continue;
|
||||
QString label = tr("Wiimote #%1").arg(i + 1);
|
||||
if (!states[i].connected) label += " (" + tr("Disconnected") + ")";
|
||||
|
||||
if (QListWidgetItem* item = ui->wiimoteList->item(static_cast<int>(i)); item && item->text() != label)
|
||||
if (item->text() != label)
|
||||
{
|
||||
item->setText(label);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue