mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2025-10-14 07:37:45 +00:00
configure_input: Add per-player vibration
Allows for enabling and modifying vibration and vibration strength per player. Also adds a toggle for enabling/disabling accurate vibrations. Co-authored-by: Its-Rei <kupfel@gmail.com>
This commit is contained in:
parent
ee8ec56291
commit
cce389221b
18 changed files with 751 additions and 30 deletions
40
src/yuzu/configuration/configure_vibration.h
Normal file
40
src/yuzu/configuration/configure_vibration.h
Normal file
|
@ -0,0 +1,40 @@
|
|||
// Copyright 2020 yuzu Emulator Project
|
||||
// Licensed under GPLv2 or any later version
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <array>
|
||||
#include <memory>
|
||||
#include <QDialog>
|
||||
|
||||
class QGroupBox;
|
||||
class QSpinBox;
|
||||
|
||||
namespace Ui {
|
||||
class ConfigureVibration;
|
||||
}
|
||||
|
||||
class ConfigureVibration : public QDialog {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit ConfigureVibration(QWidget* parent);
|
||||
~ConfigureVibration() override;
|
||||
|
||||
void ApplyConfiguration();
|
||||
|
||||
private:
|
||||
void changeEvent(QEvent* event) override;
|
||||
void RetranslateUI();
|
||||
|
||||
std::unique_ptr<Ui::ConfigureVibration> ui;
|
||||
|
||||
static constexpr std::size_t NUM_PLAYERS = 8;
|
||||
|
||||
// Groupboxes encapsulating the vibration strength spinbox.
|
||||
std::array<QGroupBox*, NUM_PLAYERS> vibration_groupboxes;
|
||||
|
||||
// Spinboxes representing the vibration strength percentage.
|
||||
std::array<QSpinBox*, NUM_PLAYERS> vibration_spinboxes;
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue