From 12600f86cdcc20b700d451e7c63efaeb77ff38c0 Mon Sep 17 00:00:00 2001 From: pineappleEA Date: Sun, 25 Dec 2022 20:02:41 +0100 Subject: [PATCH] early-access version 3253 --- README.md | 2 +- .../configuration/configure_input_player.cpp | 12 ++++++++---- .../configuration/configure_input_player.h | 3 +++ .../configuration/configure_input_player.ui | 19 ------------------- 4 files changed, 12 insertions(+), 24 deletions(-) diff --git a/README.md b/README.md index 411d8612c..ee7b0f842 100755 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ yuzu emulator early access ============= -This is the source code for early-access 3252. +This is the source code for early-access 3253. ## Legal Notice diff --git a/src/yuzu/configuration/configure_input_player.cpp b/src/yuzu/configuration/configure_input_player.cpp index 1395bf63b..4dcc29bfe 100755 --- a/src/yuzu/configuration/configure_input_player.cpp +++ b/src/yuzu/configuration/configure_input_player.cpp @@ -758,13 +758,10 @@ ConfigureInputPlayer::ConfigureInputPlayer(QWidget* parent, std::size_t player_i connect(ui->comboDevices, qOverload(&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); }); @@ -1499,6 +1496,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, diff --git a/src/yuzu/configuration/configure_input_player.h b/src/yuzu/configuration/configure_input_player.h index 82c76d0f0..21957e48c 100755 --- a/src/yuzu/configuration/configure_input_player.h +++ b/src/yuzu/configuration/configure_input_player.h @@ -119,6 +119,9 @@ private: /// Handle key press events. void keyPressEvent(QKeyEvent* event) override; + /// Handle combobox list refresh + bool eventFilter(QObject* object, QEvent* event) override; + /// Update UI to reflect current configuration. void UpdateUI(); diff --git a/src/yuzu/configuration/configure_input_player.ui b/src/yuzu/configuration/configure_input_player.ui index 7c1ac0732..ae257843d 100755 --- a/src/yuzu/configuration/configure_input_player.ui +++ b/src/yuzu/configuration/configure_input_player.ui @@ -122,25 +122,6 @@ - - - - - 21 - 21 - - - - - 21 - 21 - - - - - - -