diff --git a/Ryujinx.HLE/HOS/Services/Hid/IHidServer.cs b/Ryujinx.HLE/HOS/Services/Hid/IHidServer.cs index e3c22edf69..0155fb1ebd 100644 --- a/Ryujinx.HLE/HOS/Services/Hid/IHidServer.cs +++ b/Ryujinx.HLE/HOS/Services/Hid/IHidServer.cs @@ -22,6 +22,7 @@ namespace Ryujinx.HLE.HOS.Services.Hid private bool _unintendedHomeButtonInputProtectionEnabled; private bool _vibrationPermitted; private bool _usbFullKeyControllerEnabled; + private bool _isFirmwareUpdateAvailableForSixAxisSensor; private HidNpadJoyAssignmentMode _npadJoyAssignmentMode; private HidNpadHandheldActivationMode _npadHandheldActivationMode; @@ -47,6 +48,8 @@ namespace Ryujinx.HLE.HOS.Services.Hid _npadHandheldActivationMode = HidNpadHandheldActivationMode.Dual; _gyroscopeZeroDriftMode = HidGyroscopeZeroDriftMode.Standard; + _isFirmwareUpdateAvailableForSixAxisSensor = false; + _sensorFusionParams = new HidSensorFusionParameters(); _accelerometerParams = new HidAccelerometerParameters(); _vibrationValue = new HidVibrationValue(); @@ -574,6 +577,21 @@ namespace Ryujinx.HLE.HOS.Services.Hid return ResultCode.Success; } + [CommandHipc(83)] // 6.0.0+ + // IsFirmwareUpdateAvailableForSixAxisSensor(nn::hid::AppletResourceUserId, nn::hid::SixAxisSensorHandle, pid) -> bool UpdateAvailable + public ResultCode IsFirmwareUpdateAvailableForSixAxisSensor(ServiceCtx context) + { + int sixAxisSensorHandle = context.RequestData.ReadInt32(); + context.RequestData.BaseStream.Position += 4; + long appletResourceUserId = context.RequestData.ReadInt64(); + + context.ResponseData.Write(_isFirmwareUpdateAvailableForSixAxisSensor); + + Logger.Stub?.PrintStub(LogClass.ServiceHid, new { appletResourceUserId, sixAxisSensorHandle, _isFirmwareUpdateAvailableForSixAxisSensor }); + + return ResultCode.Success; + } + [CommandHipc(91)] // ActivateGesture(nn::applet::AppletResourceUserId, int Unknown0) public ResultCode ActivateGesture(ServiceCtx context) diff --git a/Ryujinx.HLE/HOS/Services/Hid/Irs/IIrSensorServer.cs b/Ryujinx.HLE/HOS/Services/Hid/Irs/IIrSensorServer.cs index 439411a420..e47a7d1c2a 100644 --- a/Ryujinx.HLE/HOS/Services/Hid/Irs/IIrSensorServer.cs +++ b/Ryujinx.HLE/HOS/Services/Hid/Irs/IIrSensorServer.cs @@ -1,4 +1,4 @@ -using Ryujinx.Common.Logging; +using Ryujinx.Common.Logging; using Ryujinx.HLE.HOS.Ipc; using Ryujinx.HLE.HOS.Kernel.Common; using Ryujinx.HLE.HOS.Services.Hid.HidServer; @@ -75,6 +75,20 @@ namespace Ryujinx.HLE.HOS.Services.Hid.Irs return ResultCode.Success; } + [CommandHipc(314)] // 3.0.0+ + // CheckFirmwareVersion(nn::irsensor::IrCameraHandle, nn::irsensor::PackedMcuVersion, nn::applet::AppletResourceUserId, pid) + public ResultCode CheckFirmwareVersion(ServiceCtx context) + { + int irCameraHandle = context.RequestData.ReadInt32(); + short packedMcuVersionMajor = context.RequestData.ReadInt16(); + short packedMcuVersionMinor = context.RequestData.ReadInt16(); + long appletResourceUserId = context.RequestData.ReadInt64(); + + Logger.Stub?.PrintStub(LogClass.ServiceIrs, new { appletResourceUserId, irCameraHandle, packedMcuVersionMajor, packedMcuVersionMinor }); + + return ResultCode.Success; + } + [CommandHipc(319)] // 4.0.0+ // ActivateIrsensorWithFunctionLevel(nn::applet::AppletResourceUserId, nn::irsensor::PackedFunctionLevel, pid) public ResultCode ActivateIrsensorWithFunctionLevel(ServiceCtx context)