Fix direct keyboard not working when connected with a controller
- Pass KeyboardDriver to NpadController.GetHLEKeyboardInput(). - Always fetch all keyboards if Direct Keyboard is turned on. - Remove unnecessary return null.
This commit is contained in:
parent
c6f8bfed90
commit
7e118bc07a
2 changed files with 23 additions and 25 deletions
|
@ -487,10 +487,10 @@ namespace Ryujinx.Input.HLE
|
|||
return value;
|
||||
}
|
||||
|
||||
public KeyboardInput? GetHLEKeyboardInput()
|
||||
{
|
||||
if (_gamepad is IKeyboard keyboard)
|
||||
public KeyboardInput? GetHLEKeyboardInput(IGamepadDriver KeyboardDriver)
|
||||
{
|
||||
var keyboard = KeyboardDriver.GetGamepad("0") as IKeyboard;
|
||||
|
||||
KeyboardStateSnapshot keyboardState = keyboard.GetKeyboardStateSnapshot();
|
||||
|
||||
KeyboardInput hidKeyboard = new()
|
||||
|
@ -514,9 +514,7 @@ namespace Ryujinx.Input.HLE
|
|||
}
|
||||
|
||||
return hidKeyboard;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -234,7 +234,7 @@ namespace Ryujinx.Input.HLE
|
|||
|
||||
if (_enableKeyboard)
|
||||
{
|
||||
hleKeyboardInput = controller.GetHLEKeyboardInput();
|
||||
hleKeyboardInput = controller.GetHLEKeyboardInput(_keyboardDriver);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue