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-07 20:22:47 +0200
committerMorph <39850852+Morph1984@users.noreply.github.com>2020-11-16 05:33:20 +0100
commit07b81f57babcc7aa41fddfc892148688e841d96e (patch)
tree1fc825c5a8e9b93ee1384f4713b3379ec4218931 /src/core/hle/service/hid/controllers/npad.h
parenthid: Pop a struct of parameters instead of popping individual parameters (diff)
downloadyuzu-07b81f57babcc7aa41fddfc892148688e841d96e.tar
yuzu-07b81f57babcc7aa41fddfc892148688e841d96e.tar.gz
yuzu-07b81f57babcc7aa41fddfc892148688e841d96e.tar.bz2
yuzu-07b81f57babcc7aa41fddfc892148688e841d96e.tar.lz
yuzu-07b81f57babcc7aa41fddfc892148688e841d96e.tar.xz
yuzu-07b81f57babcc7aa41fddfc892148688e841d96e.tar.zst
yuzu-07b81f57babcc7aa41fddfc892148688e841d96e.zip
Diffstat (limited to 'src/core/hle/service/hid/controllers/npad.h')
-rw-r--r--src/core/hle/service/hid/controllers/npad.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/core/hle/service/hid/controllers/npad.h b/src/core/hle/service/hid/controllers/npad.h
index 35dd2bf5f..c1b19103a 100644
--- a/src/core/hle/service/hid/controllers/npad.h
+++ b/src/core/hle/service/hid/controllers/npad.h
@@ -109,13 +109,13 @@ public:
};
static_assert(sizeof(NpadStyleSet) == 4, "NpadStyleSet is an invalid size");
- struct Vibration {
+ struct VibrationValue {
f32 amp_low;
f32 freq_low;
f32 amp_high;
f32 freq_high;
};
- static_assert(sizeof(Vibration) == 0x10, "Vibration is an invalid size");
+ static_assert(sizeof(VibrationValue) == 0x10, "Vibration is an invalid size");
struct LedPattern {
explicit LedPattern(u64 light1, u64 light2, u64 light3, u64 light4) {
@@ -148,10 +148,10 @@ public:
void SetNpadMode(u32 npad_id, NpadAssignments assignment_mode);
- void VibrateController(const std::vector<u32>& controllers,
- const std::vector<Vibration>& vibrations);
+ void VibrateController(const std::vector<DeviceHandle>& vibration_device_handles,
+ const std::vector<VibrationValue>& vibration_values);
- Vibration GetLastVibration() const;
+ VibrationValue GetLastVibration(const DeviceHandle& vibration_device_handle) const;
std::shared_ptr<Kernel::ReadableEvent> GetStyleSetChangedEvent(u32 npad_id) const;
void SignalStyleSetChangedEvent(u32 npad_id) const;
@@ -410,7 +410,7 @@ private:
NpadHandheldActivationMode handheld_activation_mode{NpadHandheldActivationMode::Dual};
// Each controller should have their own styleset changed event
std::array<Kernel::EventPair, 10> styleset_changed_events;
- Vibration last_processed_vibration{};
+ std::array<std::array<VibrationValue, 3>, 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};