set: Quick implementation of GetKeyCodeMap/GetKeyCodeMap2 (#1210)

* set: Quick implementation of GetKeyCodeMap/GetKeyCodeMap2

This fixed USB keyboard access in official titles.

* hid: Stub SendKeyboardLockKeyEvent

* Update Ryujinx.HLE/HOS/Services/Settings/ISettingsServer.cs

Co-authored-by: Ac_K <Acoustik666@gmail.com>

* Update Ryujinx.HLE/HOS/Services/Hid/IHidServer.cs

Co-authored-by: Ac_K <Acoustik666@gmail.com>

* set: KeyboardLayout bringup

* set: Small bugfix

* Fix GetKeyCodeMapImpl

* Revert SystemRegion > RegionCode in Configuration

* Fix SendKeyboardLockKeyEvent

Co-authored-by: Ac_K <Acoustik666@gmail.com>
This commit is contained in:
plutoo 2020-05-05 11:50:53 -07:00 committed by GitHub
parent 8be7335176
commit 7f500e7cae
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 5001 additions and 8 deletions

View file

@ -81,6 +81,7 @@ namespace Ryujinx.HLE.HOS.Services.Hid
long appletResourceUserId = context.RequestData.ReadInt64();
context.Device.Hid.Touchscreen.Active = true;
Logger.PrintStub(LogClass.ServiceHid, new { appletResourceUserId });
return ResultCode.Success;
@ -93,6 +94,7 @@ namespace Ryujinx.HLE.HOS.Services.Hid
long appletResourceUserId = context.RequestData.ReadInt64();
context.Device.Hid.Mouse.Active = true;
Logger.PrintStub(LogClass.ServiceHid, new { appletResourceUserId });
return ResultCode.Success;
@ -105,11 +107,25 @@ namespace Ryujinx.HLE.HOS.Services.Hid
long appletResourceUserId = context.RequestData.ReadInt64();
context.Device.Hid.Keyboard.Active = true;
Logger.PrintStub(LogClass.ServiceHid, new { appletResourceUserId });
return ResultCode.Success;
}
[Command(32)]
// SendKeyboardLockKeyEvent(uint flags, pid)
public ResultCode SendKeyboardLockKeyEvent(ServiceCtx context)
{
uint flags = context.RequestData.ReadUInt32();
// NOTE: This signal the keyboard driver about lock events.
Logger.PrintStub(LogClass.ServiceHid, new { flags });
return ResultCode.Success;
}
[Command(40)]
// AcquireXpadIdEventHandle(ulong XpadId) -> nn::sf::NativeHandle
public ResultCode AcquireXpadIdEventHandle(ServiceCtx context)