diff options
| author | Pokechu22 <Pokechu022@gmail.com> | 2021-09-03 21:43:19 -0700 |
|---|---|---|
| committer | Pokechu22 <Pokechu022@gmail.com> | 2021-10-13 12:32:16 -0700 |
| commit | 78bfd25964206a1f0a34170fdd90ca1a8ce242db (patch) | |
| tree | 93aeabec56ac75e8d88baeb6f78e27840d09dead /Source/Core/InputCommon/ControllerInterface/DInput | |
| parent | 525e6b21943b09172043797535db6a2890c45805 (diff) | |
Fix all uninitialized variable warnings (C26495)
Diffstat (limited to 'Source/Core/InputCommon/ControllerInterface/DInput')
3 files changed, 3 insertions, 6 deletions
diff --git a/Source/Core/InputCommon/ControllerInterface/DInput/DInputJoystick.cpp b/Source/Core/InputCommon/ControllerInterface/DInput/DInputJoystick.cpp index 5a6c6c221e..e7a8bea6fe 100644 --- a/Source/Core/InputCommon/ControllerInterface/DInput/DInputJoystick.cpp +++ b/Source/Core/InputCommon/ControllerInterface/DInput/DInputJoystick.cpp @@ -177,9 +177,6 @@ Joystick::Joystick(const LPDIRECTINPUTDEVICE8 device) : m_device(device) InitForceFeedback(m_device, num_ff_axes); } - // Zero inputs: - m_state_in = {}; - // Set hats to center: // "The center position is normally reported as -1" -MSDN std::fill(std::begin(m_state_in.rgdwPOV), std::end(m_state_in.rgdwPOV), -1); diff --git a/Source/Core/InputCommon/ControllerInterface/DInput/DInputJoystick.h b/Source/Core/InputCommon/ControllerInterface/DInput/DInputJoystick.h index be04becf41..a142aeba00 100644 --- a/Source/Core/InputCommon/ControllerInterface/DInput/DInputJoystick.h +++ b/Source/Core/InputCommon/ControllerInterface/DInput/DInputJoystick.h @@ -70,7 +70,7 @@ public: private: const LPDIRECTINPUTDEVICE8 m_device; - DIJOYSTATE m_state_in; + DIJOYSTATE m_state_in{}; bool m_buffered; }; diff --git a/Source/Core/InputCommon/ControllerInterface/DInput/DInputKeyboardMouse.h b/Source/Core/InputCommon/ControllerInterface/DInput/DInputKeyboardMouse.h index d174f4a28e..eba4c8ab93 100644 --- a/Source/Core/InputCommon/ControllerInterface/DInput/DInputKeyboardMouse.h +++ b/Source/Core/InputCommon/ControllerInterface/DInput/DInputKeyboardMouse.h @@ -22,10 +22,10 @@ class KeyboardMouse : public Core::Device private: struct State { - BYTE keyboard[256]; + BYTE keyboard[256]{}; // Old smoothed relative mouse movement. - DIMOUSESTATE2 mouse; + DIMOUSESTATE2 mouse{}; // Normalized mouse cursor position. Common::TVec2<ControlState> cursor; |
