summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/hid/controllers/npad.h
diff options
context:
space:
mode:
authorMorph <39850852+Morph1984@users.noreply.github.com>2020-10-20 19:55:25 +0200
committerMorph <39850852+Morph1984@users.noreply.github.com>2020-11-16 05:33:20 +0100
commite9e1876e821b8bd1bb5c8254ec93e2cc479e16dd (patch)
tree344b40a5a874cb188c6e7aa7d1622c77a215090d /src/core/hle/service/hid/controllers/npad.h
parentconfigure_input: Add per-player vibration (diff)
downloadyuzu-e9e1876e821b8bd1bb5c8254ec93e2cc479e16dd.tar
yuzu-e9e1876e821b8bd1bb5c8254ec93e2cc479e16dd.tar.gz
yuzu-e9e1876e821b8bd1bb5c8254ec93e2cc479e16dd.tar.bz2
yuzu-e9e1876e821b8bd1bb5c8254ec93e2cc479e16dd.tar.lz
yuzu-e9e1876e821b8bd1bb5c8254ec93e2cc479e16dd.tar.xz
yuzu-e9e1876e821b8bd1bb5c8254ec93e2cc479e16dd.tar.zst
yuzu-e9e1876e821b8bd1bb5c8254ec93e2cc479e16dd.zip
Diffstat (limited to 'src/core/hle/service/hid/controllers/npad.h')
-rw-r--r--src/core/hle/service/hid/controllers/npad.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/core/hle/service/hid/controllers/npad.h b/src/core/hle/service/hid/controllers/npad.h
index 576ef1558..3ae9fb8e6 100644
--- a/src/core/hle/service/hid/controllers/npad.h
+++ b/src/core/hle/service/hid/controllers/npad.h
@@ -148,7 +148,8 @@ public:
void SetNpadMode(u32 npad_id, NpadAssignments assignment_mode);
- bool VibrateControllerAtIndex(std::size_t npad_index, const VibrationValue& vibration_value);
+ bool VibrateControllerAtIndex(std::size_t npad_index, std::size_t device_index,
+ const VibrationValue& vibration_value = {});
void VibrateControllers(const std::vector<DeviceHandle>& vibration_device_handles,
const std::vector<VibrationValue>& vibration_values);
@@ -399,18 +400,22 @@ private:
using StickArray = std::array<
std::array<std::unique_ptr<Input::AnalogDevice>, Settings::NativeAnalog::NUM_STICKS_HID>,
10>;
+ using VibrationArray = std::array<std::array<std::unique_ptr<Input::VibrationDevice>,
+ Settings::NativeVibration::NUM_VIBRATIONS_HID>,
+ 10>;
using MotionArray = std::array<
- std::array<std::unique_ptr<Input::MotionDevice>, Settings::NativeMotion::NUM_MOTION_HID>,
+ std::array<std::unique_ptr<Input::MotionDevice>, Settings::NativeMotion::NUM_MOTIONS_HID>,
10>;
ButtonArray buttons;
StickArray sticks;
+ VibrationArray vibrations;
MotionArray motions;
std::vector<u32> supported_npad_id_types{};
NpadHoldType hold_type{NpadHoldType::Vertical};
NpadHandheldActivationMode handheld_activation_mode{NpadHandheldActivationMode::Dual};
// Each controller should have their own styleset changed event
std::array<Kernel::EventPair, 10> styleset_changed_events;
- std::array<std::array<VibrationValue, 3>, 10> latest_vibration_values;
+ std::array<std::array<VibrationValue, 2>, 10> latest_vibration_values{};
std::array<ControllerHolder, 10> connected_controllers{};
std::array<bool, 10> unintended_home_button_input_protection{};
GyroscopeZeroDriftMode gyroscope_zero_drift_mode{GyroscopeZeroDriftMode::Standard};