diff options
| author | ReinUsesLisp <reinuseslisp@airmail.cc> | 2021-01-15 05:33:33 -0300 |
|---|---|---|
| committer | ReinUsesLisp <reinuseslisp@airmail.cc> | 2021-01-15 16:31:19 -0300 |
| commit | f8650a9580cf61cf97011511d8a1fd53346ac99c (patch) | |
| tree | c9860b9bcbc5b308c806977d603e67d8ae996c14 /src/core/hle/service/hid/controllers/npad.cpp | |
| parent | 3ff978aa4f6b9d46179e41c36825eb06e7f8d60c (diff) | |
core: Silence Wclass-memaccess warnings
This requires making several types trivial and properly initialize
them whenever they are called.
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; |
