summaryrefslogtreecommitdiffstats
path: root/src/core
diff options
context:
space:
mode:
authorgerman77 <juangerman-13@hotmail.com>2021-11-13 09:39:01 +0100
committerNarr the Reg <juangerman-13@hotmail.com>2021-11-25 03:30:28 +0100
commit7fcfe24a3edff903871bee6c249d97e64648ddfa (patch)
treedda21fd06ae069c800e5aa69b57ed489dc309b70 /src/core
parentcore/hid: Remove usage of native types, fix a couple of errors with motion (diff)
downloadyuzu-7fcfe24a3edff903871bee6c249d97e64648ddfa.tar
yuzu-7fcfe24a3edff903871bee6c249d97e64648ddfa.tar.gz
yuzu-7fcfe24a3edff903871bee6c249d97e64648ddfa.tar.bz2
yuzu-7fcfe24a3edff903871bee6c249d97e64648ddfa.tar.lz
yuzu-7fcfe24a3edff903871bee6c249d97e64648ddfa.tar.xz
yuzu-7fcfe24a3edff903871bee6c249d97e64648ddfa.tar.zst
yuzu-7fcfe24a3edff903871bee6c249d97e64648ddfa.zip
Diffstat (limited to 'src/core')
-rw-r--r--src/core/hid/hid_types.h25
-rw-r--r--src/core/hle/service/hid/controllers/keyboard.cpp1
2 files changed, 14 insertions, 12 deletions
diff --git a/src/core/hid/hid_types.h b/src/core/hid/hid_types.h
index f224cb744..41bc65ce2 100644
--- a/src/core/hid/hid_types.h
+++ b/src/core/hid/hid_types.h
@@ -423,20 +423,21 @@ static_assert(sizeof(VibrationDeviceInfo) == 0x8, "VibrationDeviceInfo has incor
// This is nn::hid::KeyboardModifier
struct KeyboardModifier {
union {
- 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;
+ 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;
};
};
-static_assert(sizeof(KeyboardModifier) == 0x4, "KeyboardModifier is an invalid size");
+static_assert(sizeof(KeyboardModifier) == 0x8, "KeyboardModifier is an invalid size");
// This is nn::hid::KeyboardKey
struct KeyboardKey {
diff --git a/src/core/hle/service/hid/controllers/keyboard.cpp b/src/core/hle/service/hid/controllers/keyboard.cpp
index 1dc219bf5..d6505dbc5 100644
--- a/src/core/hle/service/hid/controllers/keyboard.cpp
+++ b/src/core/hle/service/hid/controllers/keyboard.cpp
@@ -42,6 +42,7 @@ void Controller_Keyboard::OnUpdate(const Core::Timing::CoreTiming& core_timing,
next_state.key = keyboard_state;
next_state.modifier = keyboard_modifier_state;
+ next_state.modifier.unknown.Assign(1);
}
keyboard_lifo.WriteNextEntry(next_state);