diff --git a/Ryujinx.HLE/Input/Hid.cs b/Ryujinx.HLE/Input/Hid.cs index e72238fb50..a45f241478 100644 --- a/Ryujinx.HLE/Input/Hid.cs +++ b/Ryujinx.HLE/Input/Hid.cs @@ -39,7 +39,8 @@ namespace Ryujinx.HLE.Input PrimaryController.Connect(controllerId); } - public void InitilizeKeyboard() { + public void InitilizeKeyboard() + { _device.Memory.FillWithZeros(HidPosition + HidKeyboardOffset, HidKeyboardSize); } @@ -136,7 +137,8 @@ namespace Ryujinx.HLE.Input } } - public void WriteKeyboard(HidKeyboard keyboard) { + public void WriteKeyboard(HidKeyboard keyboard) + { long keyboardOffset = HidPosition + HidKeyboardOffset; long lastEntry = _device.Memory.ReadInt64(keyboardOffset + 0x10); long currEntry = (lastEntry + 1) % HidEntryCount; diff --git a/Ryujinx/Ui/NpadKeyboard.cs b/Ryujinx/Ui/NpadKeyboard.cs index 655267051e..2490fdd143 100644 --- a/Ryujinx/Ui/NpadKeyboard.cs +++ b/Ryujinx/Ui/NpadKeyboard.cs @@ -118,12 +118,14 @@ namespace Ryujinx.UI.Input return buttons; } - class KeyMapping { + class KeyMapping + { public Key TargetKey; public byte Target; } - static KeyMapping[] KEY_MAPPING = new KeyMapping[] { + static KeyMapping[] KEY_MAPPING = new KeyMapping[] + { new KeyMapping { TargetKey = Key.A, Target = 0x4 }, new KeyMapping { TargetKey = Key.B, Target = 0x5 }, new KeyMapping { TargetKey = Key.C, Target = 0x6 }, @@ -251,7 +253,8 @@ namespace Ryujinx.UI.Input new KeyMapping { TargetKey = Key.WinRight, Target = 0xE7 }, }; - static KeyMapping[] KEY_MODIFIER_MAPPING = new KeyMapping[] { + static KeyMapping[] KEY_MODIFIER_MAPPING = new KeyMapping[] + { new KeyMapping { TargetKey = Key.ControlLeft, Target = 0 }, new KeyMapping { TargetKey = Key.ShiftLeft, Target = 1 }, new KeyMapping { TargetKey = Key.AltLeft, Target = 2 },