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/debug_pad.h | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'src/core/hle/service/hid/controllers/debug_pad.h') diff --git a/src/core/hle/service/hid/controllers/debug_pad.h b/src/core/hle/service/hid/controllers/debug_pad.h index 543e9f3a6..68ff0ea79 100644 --- a/src/core/hle/service/hid/controllers/debug_pad.h +++ b/src/core/hle/service/hid/controllers/debug_pad.h @@ -41,11 +41,11 @@ private: // This is nn::hid::DebugPadState struct DebugPadState { - s64 sampling_number; - DebugPadAttribute attribute; - Core::HID::DebugPadButton pad_state; - Core::HID::AnalogStickState r_stick; - Core::HID::AnalogStickState l_stick; + s64 sampling_number{}; + DebugPadAttribute attribute{}; + Core::HID::DebugPadButton pad_state{}; + Core::HID::AnalogStickState r_stick{}; + Core::HID::AnalogStickState l_stick{}; }; static_assert(sizeof(DebugPadState) == 0x20, "DebugPadState is an invalid state"); @@ -57,9 +57,8 @@ private: }; static_assert(sizeof(DebugPadSharedMemory) == 0x400, "DebugPadSharedMemory is an invalid size"); - DebugPadSharedMemory* shared_memory; - DebugPadState next_state{}; - Core::HID::EmulatedController* controller; + DebugPadSharedMemory* shared_memory = nullptr; + Core::HID::EmulatedController* controller = nullptr; }; } // namespace Service::HID -- cgit v1.2.3