Fix code style
This commit is contained in:
parent
29c3620b40
commit
542a83d431
2 changed files with 10 additions and 5 deletions
|
@ -39,7 +39,8 @@ namespace Ryujinx.HLE.Input
|
||||||
PrimaryController.Connect(controllerId);
|
PrimaryController.Connect(controllerId);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void InitilizeKeyboard() {
|
public void InitilizeKeyboard()
|
||||||
|
{
|
||||||
_device.Memory.FillWithZeros(HidPosition + HidKeyboardOffset, HidKeyboardSize);
|
_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 keyboardOffset = HidPosition + HidKeyboardOffset;
|
||||||
long lastEntry = _device.Memory.ReadInt64(keyboardOffset + 0x10);
|
long lastEntry = _device.Memory.ReadInt64(keyboardOffset + 0x10);
|
||||||
long currEntry = (lastEntry + 1) % HidEntryCount;
|
long currEntry = (lastEntry + 1) % HidEntryCount;
|
||||||
|
|
|
@ -118,12 +118,14 @@ namespace Ryujinx.UI.Input
|
||||||
return buttons;
|
return buttons;
|
||||||
}
|
}
|
||||||
|
|
||||||
class KeyMapping {
|
class KeyMapping
|
||||||
|
{
|
||||||
public Key TargetKey;
|
public Key TargetKey;
|
||||||
public byte Target;
|
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.A, Target = 0x4 },
|
||||||
new KeyMapping { TargetKey = Key.B, Target = 0x5 },
|
new KeyMapping { TargetKey = Key.B, Target = 0x5 },
|
||||||
new KeyMapping { TargetKey = Key.C, Target = 0x6 },
|
new KeyMapping { TargetKey = Key.C, Target = 0x6 },
|
||||||
|
@ -251,7 +253,8 @@ namespace Ryujinx.UI.Input
|
||||||
new KeyMapping { TargetKey = Key.WinRight, Target = 0xE7 },
|
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.ControlLeft, Target = 0 },
|
||||||
new KeyMapping { TargetKey = Key.ShiftLeft, Target = 1 },
|
new KeyMapping { TargetKey = Key.ShiftLeft, Target = 1 },
|
||||||
new KeyMapping { TargetKey = Key.AltLeft, Target = 2 },
|
new KeyMapping { TargetKey = Key.AltLeft, Target = 2 },
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue