From b80939bf5cfdee6473396dded9965d923d5d22c6 Mon Sep 17 00:00:00 2001 From: Unknown Date: Sat, 28 Jul 2018 23:33:06 +0200 Subject: [PATCH 1/2] Add some HID Commands --- Ryujinx.HLE/OsHle/Services/Hid/IHidServer.cs | 37 ++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/Ryujinx.HLE/OsHle/Services/Hid/IHidServer.cs b/Ryujinx.HLE/OsHle/Services/Hid/IHidServer.cs index 79d37fd4c9..baae578e83 100644 --- a/Ryujinx.HLE/OsHle/Services/Hid/IHidServer.cs +++ b/Ryujinx.HLE/OsHle/Services/Hid/IHidServer.cs @@ -22,10 +22,13 @@ namespace Ryujinx.HLE.OsHle.Services.Hid { 31, ActivateKeyboard }, { 66, StartSixAxisSensor }, { 79, SetGyroscopeZeroDriftMode }, + { 82, IsSixAxisSensorAtRest }, { 100, SetSupportedNpadStyleSet }, { 101, GetSupportedNpadStyleSet }, { 102, SetSupportedNpadIdType }, { 103, ActivateNpad }, + { 106, AcquireNpadStyleSetUpdateEventHandle }, + { 107, DisconnectNpad }, { 108, GetPlayerLedPattern }, { 120, SetNpadJoyHoldType }, { 121, GetNpadJoyHoldType }, @@ -103,6 +106,16 @@ namespace Ryujinx.HLE.OsHle.Services.Hid return 0; } + + public long IsSixAxisSensorAtRest(ServiceCtx Context) + { + int Handle = Context.RequestData.ReadInt32(); + long AppletResourceUserId = Context.RequestData.ReadInt64(); + + Context.ResponseData.Write(true); + + return 0; + } public long GetSupportedNpadStyleSet(ServiceCtx Context) { @@ -141,6 +154,30 @@ namespace Ryujinx.HLE.OsHle.Services.Hid return 0; } + public long AcquireNpadStyleSetUpdateEventHandle(ServiceCtx Context) + { + int Unknown = Context.RequestData.ReadInt32(); + + long AppletResourceUserId = Context.RequestData.ReadInt64(); + + long Unknown1 = Context.RequestData.ReadInt64(); + + int Handle = Context.Process.HandleTable.OpenHandle(Unknown1); + + Context.Response.HandleDesc = IpcHandleDesc.MakeCopy(Handle); + + return 0; + } + + public long DisconnectNpad(ServiceCtx Context) + { + int Id = Context.RequestData.ReadInt32(); + + long AppletResourceUserId = Context.RequestData.ReadInt64(); + + return 0; + } + public long GetPlayerLedPattern(ServiceCtx Context) { long Unknown = Context.RequestData.ReadInt32(); From ff2b3a37f5ba2bc8f1b49610e2ce3ce260752204 Mon Sep 17 00:00:00 2001 From: greggameplayer <33609333+greggameplayer@users.noreply.github.com> Date: Sun, 29 Jul 2018 13:54:22 +0200 Subject: [PATCH 2/2] delete AcquireNpadStyleSetUpdateEventHandle which is already in another PR --- Ryujinx.HLE/OsHle/Services/Hid/IHidServer.cs | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/Ryujinx.HLE/OsHle/Services/Hid/IHidServer.cs b/Ryujinx.HLE/OsHle/Services/Hid/IHidServer.cs index baae578e83..2545f8045a 100644 --- a/Ryujinx.HLE/OsHle/Services/Hid/IHidServer.cs +++ b/Ryujinx.HLE/OsHle/Services/Hid/IHidServer.cs @@ -27,7 +27,6 @@ namespace Ryujinx.HLE.OsHle.Services.Hid { 101, GetSupportedNpadStyleSet }, { 102, SetSupportedNpadIdType }, { 103, ActivateNpad }, - { 106, AcquireNpadStyleSetUpdateEventHandle }, { 107, DisconnectNpad }, { 108, GetPlayerLedPattern }, { 120, SetNpadJoyHoldType }, @@ -154,21 +153,6 @@ namespace Ryujinx.HLE.OsHle.Services.Hid return 0; } - public long AcquireNpadStyleSetUpdateEventHandle(ServiceCtx Context) - { - int Unknown = Context.RequestData.ReadInt32(); - - long AppletResourceUserId = Context.RequestData.ReadInt64(); - - long Unknown1 = Context.RequestData.ReadInt64(); - - int Handle = Context.Process.HandleTable.OpenHandle(Unknown1); - - Context.Response.HandleDesc = IpcHandleDesc.MakeCopy(Handle); - - return 0; - } - public long DisconnectNpad(ServiceCtx Context) { int Id = Context.RequestData.ReadInt32();