diff options
author | bunnei <bunneidev@gmail.com> | 2021-01-17 09:55:10 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-17 09:55:10 +0100 |
commit | e8401964b4cb617223554e147091f109dc870ba5 (patch) | |
tree | 0e963c000006ca547044bdc628177311fa0dc585 /src/core/hle/service/hid/controllers/npad.cpp | |
parent | Merge pull request #5745 from lioncash/documentation (diff) | |
parent | core/cmake: Enforce Wclass-memaccess (diff) | |
download | yuzu-e8401964b4cb617223554e147091f109dc870ba5.tar yuzu-e8401964b4cb617223554e147091f109dc870ba5.tar.gz yuzu-e8401964b4cb617223554e147091f109dc870ba5.tar.bz2 yuzu-e8401964b4cb617223554e147091f109dc870ba5.tar.lz yuzu-e8401964b4cb617223554e147091f109dc870ba5.tar.xz yuzu-e8401964b4cb617223554e147091f109dc870ba5.tar.zst yuzu-e8401964b4cb617223554e147091f109dc870ba5.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; |