diff options
author | ReinUsesLisp <reinuseslisp@airmail.cc> | 2021-01-15 09:33:33 +0100 |
---|---|---|
committer | ReinUsesLisp <reinuseslisp@airmail.cc> | 2021-01-15 20:31:19 +0100 |
commit | f8650a9580cf61cf97011511d8a1fd53346ac99c (patch) | |
tree | c9860b9bcbc5b308c806977d603e67d8ae996c14 /src/core/hle/service/hid/controllers/npad.h | |
parent | common/common_funcs: Rename INSERT_UNION_PADDING_{BYTES,WORDS} to _NOINIT (diff) | |
download | yuzu-f8650a9580cf61cf97011511d8a1fd53346ac99c.tar yuzu-f8650a9580cf61cf97011511d8a1fd53346ac99c.tar.gz yuzu-f8650a9580cf61cf97011511d8a1fd53346ac99c.tar.bz2 yuzu-f8650a9580cf61cf97011511d8a1fd53346ac99c.tar.lz yuzu-f8650a9580cf61cf97011511d8a1fd53346ac99c.tar.xz yuzu-f8650a9580cf61cf97011511d8a1fd53346ac99c.tar.zst yuzu-f8650a9580cf61cf97011511d8a1fd53346ac99c.zip |
Diffstat (limited to 'src/core/hle/service/hid/controllers/npad.h')
-rw-r--r-- | src/core/hle/service/hid/controllers/npad.h | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/src/core/hle/service/hid/controllers/npad.h b/src/core/hle/service/hid/controllers/npad.h index e2e826623..bc85ca4df 100644 --- a/src/core/hle/service/hid/controllers/npad.h +++ b/src/core/hle/service/hid/controllers/npad.h @@ -97,10 +97,10 @@ public: }; struct DeviceHandle { - NpadType npad_type{}; - u8 npad_id{}; - DeviceIndex device_index{}; - INSERT_PADDING_BYTES(1); + NpadType npad_type; + u8 npad_id; + DeviceIndex device_index; + INSERT_PADDING_BYTES_NOINIT(1); }; static_assert(sizeof(DeviceHandle) == 4, "DeviceHandle is an invalid size"); @@ -120,13 +120,20 @@ public: static_assert(sizeof(NpadStyleSet) == 4, "NpadStyleSet is an invalid size"); struct VibrationValue { - f32 amp_low{0.0f}; - f32 freq_low{160.0f}; - f32 amp_high{0.0f}; - f32 freq_high{320.0f}; + f32 amp_low; + f32 freq_low; + f32 amp_high; + f32 freq_high; }; static_assert(sizeof(VibrationValue) == 0x10, "Vibration is an invalid size"); + static constexpr VibrationValue DEFAULT_VIBRATION_VALUE{ + .amp_low = 0.0f, + .freq_low = 160.0f, + .amp_high = 0.0f, + .freq_high = 320.0f, + }; + struct LedPattern { explicit LedPattern(u64 light1, u64 light2, u64 light3, u64 light4) { position1.Assign(light1); |