0
0
Fork 0
mirror of https://github.com/ryujinx-mirror/ryujinx.git synced 2024-12-22 22:25:44 +00:00

Fix homebrew input (#528)

* fix homebrew input
This commit is contained in:
emmauss 2018-12-07 22:59:38 +02:00 committed by GitHub
parent 5b4382f459
commit f1529b1bc2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 15 additions and 1 deletions

View file

@ -39,7 +39,7 @@ namespace Ryujinx.HLE.Input
PrimaryController.Connect(controllerId);
}
private HidControllerButtons UpdateStickButtons(
public HidControllerButtons UpdateStickButtons(
HidJoystickPosition leftStick,
HidJoystickPosition rightStick)
{

View file

@ -81,6 +81,12 @@
Device.Memory.WriteInt64(controllerOffset + 0x28,
(Connected ? (uint)HidControllerConnState.ControllerStateConnected : 0) |
(_currentLayout == HidControllerLayouts.HandheldJoined ? (uint)HidControllerConnState.ControllerStateWired : 0));
controllerOffset = WriteInput(buttons, leftStick, rightStick, HidControllerLayouts.Main);
Device.Memory.WriteInt64(controllerOffset + 0x28,
(Connected ? (uint)HidControllerConnState.ControllerStateWired : 0) |
(uint)HidControllerConnState.ControllerStateWired);
}
}
}

View file

@ -39,6 +39,12 @@
Device.Memory.WriteInt64(controllerOffset + 0x28,
(Connected ? (uint)HidControllerConnState.ControllerStateConnected : 0) |
(_wired ? (uint)HidControllerConnState.ControllerStateWired : 0));
controllerOffset = WriteInput(buttons, leftStick, rightStick, HidControllerLayouts.Main);
Device.Memory.WriteInt64(controllerOffset + 0x28,
(Connected ? (uint)HidControllerConnState.ControllerStateWired : 0) |
(uint)HidControllerConnState.ControllerStateWired);
}
}
}

View file

@ -174,6 +174,8 @@ namespace Ryujinx
Dy = rightJoystickDy
};
currentButton |= _device.Hid.UpdateStickButtons(leftJoystick, rightJoystick);
bool hasTouch = false;
//Get screen touch position from left mouse click