Get Keyboard Inputs outside of the controller loop.

- Moved GetHLEKeyboardInput outside of the controller loop.
- Made GetHLEKeyboardInput public static from public
This commit is contained in:
MaxLastBreath 2024-04-26 04:20:14 +03:00
commit a3023493c8
2 changed files with 6 additions and 5 deletions

View file

@ -487,7 +487,7 @@ namespace Ryujinx.Input.HLE
return value; return value;
} }
public KeyboardInput? GetHLEKeyboardInput(IGamepadDriver KeyboardDriver) public static KeyboardInput? GetHLEKeyboardInput(IGamepadDriver KeyboardDriver)
{ {
var keyboard = KeyboardDriver.GetGamepad("0") as IKeyboard; var keyboard = KeyboardDriver.GetGamepad("0") as IKeyboard;

View file

@ -232,10 +232,6 @@ namespace Ryujinx.Input.HLE
motionState = (controller.GetHLEMotionState(), altMotionState); motionState = (controller.GetHLEMotionState(), altMotionState);
if (_enableKeyboard)
{
hleKeyboardInput = controller.GetHLEKeyboardInput(_keyboardDriver);
}
} }
else else
{ {
@ -257,6 +253,11 @@ namespace Ryujinx.Input.HLE
} }
} }
if (!_blockInputUpdates && _enableKeyboard)
{
hleKeyboardInput = NpadController.GetHLEKeyboardInput(_keyboardDriver);
}
_device.Hid.Npads.Update(hleInputStates); _device.Hid.Npads.Update(hleInputStates);
_device.Hid.Npads.UpdateSixAxis(hleMotionStates); _device.Hid.Npads.UpdateSixAxis(hleMotionStates);