mirror of
https://github.com/yuzu-emu/yuzu-android.git
synced 2025-06-13 03:28:02 -05:00
yuzu: Automatically refresh device list
This commit is contained in:
@ -738,13 +738,10 @@ ConfigureInputPlayer::ConfigureInputPlayer(QWidget* parent, std::size_t player_i
|
||||
|
||||
connect(ui->comboDevices, qOverload<int>(&QComboBox::activated), this,
|
||||
&ConfigureInputPlayer::UpdateMappingWithDefaults);
|
||||
ui->comboDevices->installEventFilter(this);
|
||||
|
||||
ui->comboDevices->setCurrentIndex(-1);
|
||||
|
||||
ui->buttonRefreshDevices->setIcon(QIcon::fromTheme(QStringLiteral("view-refresh")));
|
||||
connect(ui->buttonRefreshDevices, &QPushButton::clicked,
|
||||
[this] { emit RefreshInputDevices(); });
|
||||
|
||||
timeout_timer->setSingleShot(true);
|
||||
connect(timeout_timer.get(), &QTimer::timeout, [this] { SetPollingResult({}, true); });
|
||||
|
||||
@ -1479,6 +1476,13 @@ void ConfigureInputPlayer::keyPressEvent(QKeyEvent* event) {
|
||||
}
|
||||
}
|
||||
|
||||
bool ConfigureInputPlayer::eventFilter(QObject* object, QEvent* event) {
|
||||
if (object == ui->comboDevices && event->type() == QEvent::MouseButtonPress) {
|
||||
RefreshInputDevices();
|
||||
}
|
||||
return object->eventFilter(object, event);
|
||||
}
|
||||
|
||||
void ConfigureInputPlayer::CreateProfile() {
|
||||
const auto profile_name =
|
||||
LimitableInputDialog::GetText(this, tr("New Profile"), tr("Enter a profile name:"), 1, 30,
|
||||
|
Reference in New Issue
Block a user