diff options
author | german77 <juangerman-13@hotmail.com> | 2021-11-15 04:28:38 +0100 |
---|---|---|
committer | Narr the Reg <juangerman-13@hotmail.com> | 2021-11-25 03:30:28 +0100 |
commit | f4e5f89e6fb9d68cd4ba7d98c281584c50f0e149 (patch) | |
tree | 9e9f9114d9b7528e74e78102279411595632f048 /src/core/hid/hid_types.h | |
parent | core/hid: Fully implement native mouse (diff) | |
download | yuzu-f4e5f89e6fb9d68cd4ba7d98c281584c50f0e149.tar yuzu-f4e5f89e6fb9d68cd4ba7d98c281584c50f0e149.tar.gz yuzu-f4e5f89e6fb9d68cd4ba7d98c281584c50f0e149.tar.bz2 yuzu-f4e5f89e6fb9d68cd4ba7d98c281584c50f0e149.tar.lz yuzu-f4e5f89e6fb9d68cd4ba7d98c281584c50f0e149.tar.xz yuzu-f4e5f89e6fb9d68cd4ba7d98c281584c50f0e149.tar.zst yuzu-f4e5f89e6fb9d68cd4ba7d98c281584c50f0e149.zip |
Diffstat (limited to '')
-rw-r--r-- | src/core/hid/hid_types.h | 35 |
1 files changed, 22 insertions, 13 deletions
diff --git a/src/core/hid/hid_types.h b/src/core/hid/hid_types.h index af95f3aff..8b12f63ad 100644 --- a/src/core/hid/hid_types.h +++ b/src/core/hid/hid_types.h @@ -502,21 +502,30 @@ static_assert(sizeof(VibrationDeviceInfo) == 0x8, "VibrationDeviceInfo has incor // This is nn::hid::KeyboardModifier struct KeyboardModifier { union { - u64 raw{}; - BitField<0, 1, u64> control; - BitField<1, 1, u64> shift; - BitField<2, 1, u64> left_alt; - BitField<3, 1, u64> right_alt; - BitField<4, 1, u64> gui; - BitField<8, 1, u64> caps_lock; - BitField<9, 1, u64> scroll_lock; - BitField<10, 1, u64> num_lock; - BitField<11, 1, u64> katakana; - BitField<12, 1, u64> hiragana; - BitField<32, 1, u64> unknown; + u32 raw{}; + BitField<0, 1, u32> control; + BitField<1, 1, u32> shift; + BitField<2, 1, u32> left_alt; + BitField<3, 1, u32> right_alt; + BitField<4, 1, u32> gui; + BitField<8, 1, u32> caps_lock; + BitField<9, 1, u32> scroll_lock; + BitField<10, 1, u32> num_lock; + BitField<11, 1, u32> katakana; + BitField<12, 1, u32> hiragana; + }; +}; + +static_assert(sizeof(KeyboardModifier) == 0x4, "KeyboardModifier is an invalid size"); + +// This is nn::hid::KeyboardAttribute +struct KeyboardAttribute { + union { + u32 raw{}; + BitField<0, 1, u32> is_connected; }; }; -static_assert(sizeof(KeyboardModifier) == 0x8, "KeyboardModifier is an invalid size"); +static_assert(sizeof(KeyboardAttribute) == 0x4, "KeyboardAttribute is an invalid size"); // This is nn::hid::KeyboardKey struct KeyboardKey { |