Address Feedback

This commit is contained in:
John Clemis 2018-08-20 15:08:28 -05:00
parent 96aa4618ce
commit d5cc79f04a

View file

@ -252,24 +252,24 @@ namespace Ryujinx
Device.Hid.SetTouchPoints(); Device.Hid.SetTouchPoints();
} }
foreach (KeyValuePair<HidControllerId, HidEmulatedDevices.HostDevice> entry in HidEmulatedDevices.Devices) foreach (KeyValuePair<HidControllerId, HidEmulatedDevices.HostDevice> Entry in HidEmulatedDevices.Devices)
{ {
if (entry.Value != HidEmulatedDevices.HostDevice.None) if (Entry.Value != HidEmulatedDevices.HostDevice.None)
{ {
bool IsKeyboard = entry.Value == HidEmulatedDevices.HostDevice.Keyboard; bool IsKeyboard = Entry.Value == HidEmulatedDevices.HostDevice.Keyboard;
Device.Hid.SetJoyconButton( Device.Hid.SetJoyconButton(
entry.Key, Entry.Key,
(entry.Key == HidControllerId.CONTROLLER_HANDHELD) ? HidControllerLayouts.Handheld_Joined : HidControllerLayouts.Joined, (Entry.Key == HidControllerId.CONTROLLER_HANDHELD) ? HidControllerLayouts.Handheld_Joined : HidControllerLayouts.Joined,
IsKeyboard ? CurrentButtonsKeyboard : CurrentButtonsGamePad[GetGamePadIndexFromHostDevice(entry.Value)], IsKeyboard ? CurrentButtonsKeyboard : CurrentButtonsGamePad[GetGamePadIndexFromHostDevice(Entry.Value)],
IsKeyboard ? LeftJoystickKeyboard : LeftJoystickGamePad [GetGamePadIndexFromHostDevice(entry.Value)], IsKeyboard ? LeftJoystickKeyboard : LeftJoystickGamePad [GetGamePadIndexFromHostDevice(Entry.Value)],
IsKeyboard ? RightJoystickKeyboard : RightJoystickGamePad [GetGamePadIndexFromHostDevice(entry.Value)]); IsKeyboard ? RightJoystickKeyboard : RightJoystickGamePad [GetGamePadIndexFromHostDevice(Entry.Value)]);
Device.Hid.SetJoyconButton( Device.Hid.SetJoyconButton(
entry.Key, Entry.Key,
HidControllerLayouts.Main, HidControllerLayouts.Main,
IsKeyboard ? CurrentButtonsKeyboard : CurrentButtonsGamePad[GetGamePadIndexFromHostDevice(entry.Value)], IsKeyboard ? CurrentButtonsKeyboard : CurrentButtonsGamePad[GetGamePadIndexFromHostDevice(Entry.Value)],
IsKeyboard ? LeftJoystickKeyboard : LeftJoystickGamePad [GetGamePadIndexFromHostDevice(entry.Value)], IsKeyboard ? LeftJoystickKeyboard : LeftJoystickGamePad [GetGamePadIndexFromHostDevice(Entry.Value)],
IsKeyboard ? RightJoystickKeyboard : RightJoystickGamePad [GetGamePadIndexFromHostDevice(entry.Value)]); IsKeyboard ? RightJoystickKeyboard : RightJoystickGamePad [GetGamePadIndexFromHostDevice(Entry.Value)]);
} }
} }
} }