input: only unregister devices if there is no other handler registered

Also center mouse if a new device was added
This commit is contained in:
Megamouse 2024-05-23 23:58:54 +02:00
parent 657acc90e4
commit 21c03b74b6
3 changed files with 48 additions and 27 deletions

View file

@ -174,7 +174,7 @@ void raw_mouse_settings_dialog::update_combo_box(usz player)
combo->setCurrentIndex(std::max(0, combo->findData(current_device)));
combo->blockSignals(false);
if (player == m_tab_widget->currentIndex())
if (static_cast<int>(player) == m_tab_widget->currentIndex())
{
handle_device_change(device_name);
}