From 0f3ad939a85494a8a9bdcb6f357c774f385f647e Mon Sep 17 00:00:00 2001 From: Narr the Reg Date: Wed, 20 Apr 2022 12:00:26 -0500 Subject: service: hid: Ensure all structs are initialized --- src/core/hle/service/hid/controllers/xpad.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/core/hle/service/hid/controllers/xpad.h') diff --git a/src/core/hle/service/hid/controllers/xpad.h b/src/core/hle/service/hid/controllers/xpad.h index 7ed8d5d97..d01dee5fc 100644 --- a/src/core/hle/service/hid/controllers/xpad.h +++ b/src/core/hle/service/hid/controllers/xpad.h @@ -90,11 +90,11 @@ private: // This is nn::hid::detail::BasicXpadState struct BasicXpadState { - s64 sampling_number; - BasicXpadAttributeSet attributes; - BasicXpadButtonSet pad_states; - Core::HID::AnalogStickState l_stick; - Core::HID::AnalogStickState r_stick; + s64 sampling_number{}; + BasicXpadAttributeSet attributes{}; + BasicXpadButtonSet pad_states{}; + Core::HID::AnalogStickState l_stick{}; + Core::HID::AnalogStickState r_stick{}; }; static_assert(sizeof(BasicXpadState) == 0x20, "BasicXpadState is an invalid size"); @@ -106,7 +106,7 @@ private: }; static_assert(sizeof(XpadSharedMemory) == 0x400, "XpadSharedMemory is an invalid size"); - XpadSharedMemory* shared_memory; BasicXpadState next_state{}; + XpadSharedMemory* shared_memory = nullptr; }; } // namespace Service::HID -- cgit v1.2.3