aboutsummaryrefslogtreecommitdiff
path: root/src/Ryujinx.HLE/HOS/Services/Hid/IHidbusServer.cs
diff options
context:
space:
mode:
authorSteveice10 <1269164+Steveice10@users.noreply.github.com>2023-06-12 08:33:13 -0700
committerGitHub <noreply@github.com>2023-06-12 17:33:13 +0200
commit915a0f7173299c0b8a2c285f4e90b34cdae80811 (patch)
tree9eee19e7488489803e362b776a43f9083ae57d7b /src/Ryujinx.HLE/HOS/Services/Hid/IHidbusServer.cs
parent0cc266ff190b2594304271f1635b624ef008036f (diff)
hle: Stub IHidbusServer.GetBusHandle (#5284)
Diffstat (limited to 'src/Ryujinx.HLE/HOS/Services/Hid/IHidbusServer.cs')
-rw-r--r--src/Ryujinx.HLE/HOS/Services/Hid/IHidbusServer.cs23
1 files changed, 22 insertions, 1 deletions
diff --git a/src/Ryujinx.HLE/HOS/Services/Hid/IHidbusServer.cs b/src/Ryujinx.HLE/HOS/Services/Hid/IHidbusServer.cs
index bfd1d4dc..eec5292f 100644
--- a/src/Ryujinx.HLE/HOS/Services/Hid/IHidbusServer.cs
+++ b/src/Ryujinx.HLE/HOS/Services/Hid/IHidbusServer.cs
@@ -1,8 +1,29 @@
-namespace Ryujinx.HLE.HOS.Services.Hid
+using Ryujinx.Common;
+using Ryujinx.Common.Logging;
+
+namespace Ryujinx.HLE.HOS.Services.Hid
{
[Service("hidbus")]
class IHidbusServer : IpcService
{
public IHidbusServer(ServiceCtx context) { }
+
+ [CommandCmif(1)]
+ // GetBusHandle(nn::hid::NpadIdType, nn::hidbus::BusType, nn::applet::AppletResourceUserId) -> (bool HasHandle, nn::hidbus::BusHandle)
+ public ResultCode GetBusHandle(ServiceCtx context)
+ {
+ NpadIdType npadIdType = (NpadIdType)context.RequestData.ReadInt32();
+ context.RequestData.BaseStream.Position += 4; // Padding
+ BusType busType = (BusType)context.RequestData.ReadInt64();
+ long appletResourceUserId = context.RequestData.ReadInt64();
+
+ context.ResponseData.Write(false);
+ context.ResponseData.BaseStream.Position += 7; // Padding
+ context.ResponseData.WriteStruct(new BusHandle());
+
+ Logger.Stub?.PrintStub(LogClass.ServiceHid, new { npadIdType, busType, appletResourceUserId });
+
+ return ResultCode.Success;
+ }
}
} \ No newline at end of file