Fix for loops code style

This commit is contained in:
Thog 2019-04-26 19:17:10 +02:00
parent 542a83d431
commit edb7b6222f
No known key found for this signature in database
GPG key ID: 0CD291558FAFDBC6
2 changed files with 6 additions and 3 deletions

View file

@ -158,7 +158,8 @@ namespace Ryujinx.HLE.Input
_device.Memory.WriteInt64(keyboardEntryOffset + 0x08, sampleCounter);
_device.Memory.WriteInt64(keyboardEntryOffset + 0x10, keyboard.Modifier);
for (int i = 0; i < keyboard.Keys.Length; i++) {
for (int i = 0; i < keyboard.Keys.Length; i++)
{
_device.Memory.WriteInt32(keyboardEntryOffset + 0x18 + (i * 4), keyboard.Keys[i]);
}
}

View file

@ -276,12 +276,14 @@ namespace Ryujinx.UI.Input
Keys = new int[0x8]
};
foreach (KeyMapping keyMapping in KEY_MAPPING) {
foreach (KeyMapping keyMapping in KEY_MAPPING)
{
int value = keyboard[keyMapping.TargetKey] ? 1 : 0;
hidKeyboard.Keys[keyMapping.Target / 0x20] |= (value << (keyMapping.Target % 0x20));
}
foreach (KeyMapping keyMapping in KEY_MODIFIER_MAPPING) {
foreach (KeyMapping keyMapping in KEY_MODIFIER_MAPPING)
{
int value = keyboard[keyMapping.TargetKey] ? 1 : 0;
hidKeyboard.Modifier |= value << keyMapping.Target;
}