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.cpp | |
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.cpp')
-rw-r--r-- | src/core/hle/service/hid/controllers/npad.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/core/hle/service/hid/controllers/npad.cpp b/src/core/hle/service/hid/controllers/npad.cpp index d280e7caf..1082be489 100644 --- a/src/core/hle/service/hid/controllers/npad.cpp +++ b/src/core/hle/service/hid/controllers/npad.cpp @@ -141,7 +141,9 @@ bool Controller_NPad::IsDeviceHandleValid(const DeviceHandle& device_handle) { device_handle.device_index < DeviceIndex::MaxDeviceIndex; } -Controller_NPad::Controller_NPad(Core::System& system) : ControllerBase(system), system(system) {} +Controller_NPad::Controller_NPad(Core::System& system) : ControllerBase(system), system(system) { + latest_vibration_values.fill({DEFAULT_VIBRATION_VALUE, DEFAULT_VIBRATION_VALUE}); +} Controller_NPad::~Controller_NPad() { OnRelease(); @@ -732,7 +734,7 @@ bool Controller_NPad::VibrateControllerAtIndex(std::size_t npad_index, std::size // Send an empty vibration to stop any vibrations. vibrations[npad_index][device_index]->SetRumblePlay(0.0f, 160.0f, 0.0f, 320.0f); // Then reset the vibration value to its default value. - latest_vibration_values[npad_index][device_index] = {}; + latest_vibration_values[npad_index][device_index] = DEFAULT_VIBRATION_VALUE; } return false; |