aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTsubasa0504 <60139445+Tsubasa0504@users.noreply.github.com>2024-05-14 23:26:49 +0900
committerGitHub <noreply@github.com>2024-05-14 16:26:49 +0200
commitcada4d04efe8a3c19c290da3257c231da9872e40 (patch)
treee36462b657311ee12411d0fdaa514d69c765c99b
parente9edf0ab7fa9c64347c3e53e0d9d862756b1627f (diff)
HID: Stub IHidServer: 134 (SetNpadAnalogStickUseCenterClamp) (#6664)1.1.1302
* Add files via upload * Update IHidServer.cs mistakes... * format how do i do it * Update src/Ryujinx.HLE/HOS/Services/Hid/IHidServer.cs Co-authored-by: Agatem <agaatem@outlook.com> * Update src/Ryujinx.HLE/HOS/Services/Hid/IHidServer.cs Co-authored-by: Agatem <agaatem@outlook.com> * bruh * Apply suggestions from code review Co-authored-by: gdkchan <gab.dark.100@gmail.com> * use readuint32 instead * second thought * i hope it works thanks someone higher up with the same thing * pid * Apply suggestions from code review Co-authored-by: Ac_K <Acoustik666@gmail.com> * styles i think * Apply suggestions from code review Co-authored-by: makigumo <makigumo@users.noreply.github.com> --------- Co-authored-by: Agatem <agaatem@outlook.com> Co-authored-by: gdkchan <gab.dark.100@gmail.com> Co-authored-by: Ac_K <Acoustik666@gmail.com> Co-authored-by: makigumo <makigumo@users.noreply.github.com>
-rw-r--r--src/Ryujinx.HLE/HOS/Services/Hid/IHidServer.cs14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/Ryujinx.HLE/HOS/Services/Hid/IHidServer.cs b/src/Ryujinx.HLE/HOS/Services/Hid/IHidServer.cs
index bcc87f53..e3f505f3 100644
--- a/src/Ryujinx.HLE/HOS/Services/Hid/IHidServer.cs
+++ b/src/Ryujinx.HLE/HOS/Services/Hid/IHidServer.cs
@@ -22,6 +22,7 @@ namespace Ryujinx.HLE.HOS.Services.Hid
private bool _sixAxisSensorFusionEnabled;
private bool _unintendedHomeButtonInputProtectionEnabled;
+ private bool _npadAnalogStickCenterClampEnabled;
private bool _vibrationPermitted;
private bool _usbFullKeyControllerEnabled;
private readonly bool _isFirmwareUpdateAvailableForSixAxisSensor;
@@ -1107,6 +1108,19 @@ namespace Ryujinx.HLE.HOS.Services.Hid
// If not, it returns nothing.
}
+ [CommandCmif(134)] // 6.1.0+
+ // SetNpadUseAnalogStickUseCenterClamp(bool Enable, nn::applet::AppletResourceUserId)
+ public ResultCode SetNpadUseAnalogStickUseCenterClamp(ServiceCtx context)
+ {
+ ulong pid = context.RequestData.ReadUInt64();
+ _npadAnalogStickCenterClampEnabled = context.RequestData.ReadUInt32() != 0;
+ long appletResourceUserId = context.RequestData.ReadInt64();
+
+ Logger.Stub?.PrintStub(LogClass.ServiceHid, new { pid, appletResourceUserId, _npadAnalogStickCenterClampEnabled });
+
+ return ResultCode.Success;
+ }
+
[CommandCmif(200)]
// GetVibrationDeviceInfo(nn::hid::VibrationDeviceHandle) -> nn::hid::VibrationDeviceInfo
public ResultCode GetVibrationDeviceInfo(ServiceCtx context)