From 64f68e96354df3afb9bb563c888793f98ecb5026 Mon Sep 17 00:00:00 2001 From: Narr the Reg Date: Wed, 13 Dec 2023 21:39:38 -0600 Subject: service: hid: Allow to create multiple instances of shared memory --- .../hid/controllers/types/debug_pad_types.h | 31 ++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 src/core/hle/service/hid/controllers/types/debug_pad_types.h (limited to 'src/core/hle/service/hid/controllers/types/debug_pad_types.h') diff --git a/src/core/hle/service/hid/controllers/types/debug_pad_types.h b/src/core/hle/service/hid/controllers/types/debug_pad_types.h new file mode 100644 index 000000000..a96171b62 --- /dev/null +++ b/src/core/hle/service/hid/controllers/types/debug_pad_types.h @@ -0,0 +1,31 @@ +// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project +// SPDX-License-Identifier: GPL-3.0-or-later + +#pragma once + +#include "common/bit_field.h" +#include "common/common_types.h" +#include "core/hid/hid_types.h" + +namespace Service::HID { + +// This is nn::hid::DebugPadAttribute +struct DebugPadAttribute { + union { + u32 raw{}; + BitField<0, 1, u32> connected; + }; +}; +static_assert(sizeof(DebugPadAttribute) == 0x4, "DebugPadAttribute is an invalid size"); + +// 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{}; +}; +static_assert(sizeof(DebugPadState) == 0x20, "DebugPadState is an invalid state"); + +} // namespace Service::HID -- cgit v1.2.3