diff options
author | bunnei <bunneidev@gmail.com> | 2022-02-05 02:57:26 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-05 02:57:26 -0700 |
commit | 5cb1c2ad843c66856fab6aa964c91f0efd1d5b80 (patch) | |
tree | f119128c227c3f33172d442ad7dad6e5e9c167a2 /src/yuzu/configuration/configure_vibration.h | |
parent | 0ec5b9bff2ccf777a673f92cd6d3403fa39d9c49 (diff) | |
parent | 694c07865591782887ed4f263de162b60febe755 (diff) |
Merge pull request #7842 from german77/vibration_test
yuzu: config: Vibrate the controller while configuring vibration strength
Diffstat (limited to 'src/yuzu/configuration/configure_vibration.h')
-rw-r--r-- | src/yuzu/configuration/configure_vibration.h | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/src/yuzu/configuration/configure_vibration.h b/src/yuzu/configuration/configure_vibration.h index 37bbc2653..50b8195fa 100644 --- a/src/yuzu/configuration/configure_vibration.h +++ b/src/yuzu/configuration/configure_vibration.h @@ -15,11 +15,16 @@ namespace Ui { class ConfigureVibration; } +namespace Core::HID { +enum class ControllerTriggerType; +class HIDCore; +} // namespace Core::HID + class ConfigureVibration : public QDialog { Q_OBJECT public: - explicit ConfigureVibration(QWidget* parent); + explicit ConfigureVibration(QWidget* parent, Core::HID::HIDCore& hid_core_); ~ConfigureVibration() override; void ApplyConfiguration(); @@ -27,14 +32,21 @@ public: private: void changeEvent(QEvent* event) override; void RetranslateUI(); + void VibrateController(Core::HID::ControllerTriggerType type, std::size_t player_index); + void StopVibrations(); std::unique_ptr<Ui::ConfigureVibration> ui; static constexpr std::size_t NUM_PLAYERS = 8; - // Groupboxes encapsulating the vibration strength spinbox. + /// Groupboxes encapsulating the vibration strength spinbox. std::array<QGroupBox*, NUM_PLAYERS> vibration_groupboxes; - // Spinboxes representing the vibration strength percentage. + /// Spinboxes representing the vibration strength percentage. std::array<QSpinBox*, NUM_PLAYERS> vibration_spinboxes; + + /// Callback index to stop the controllers events + std::array<int, NUM_PLAYERS> controller_callback_key; + + Core::HID::HIDCore& hid_core; }; |