mirror of
https://github.com/Ryujinx/Ryujinx.git
synced 2024-11-11 02:36:38 +00:00
hid/irs: Stub IsFirmwareUpdateAvailableForSixAxisSensor and CheckFirmwareVersion (#2371)
* Stub two services Stubs IHidServer::IsFirmwareUpdateAvailableForSixAxisSensor and IIrSensorServer::CheckFirmwareVersion * Apply suggestions from code review Also changed PackedMcuVersion to be two shorts instead of two bytes, because that's its actual type * Apply new code review suggestions Degroup field from previous assignation + Add padding after SixAxisSensorHandle
This commit is contained in:
parent
39b25dc124
commit
afd3153ca4
2 changed files with 33 additions and 1 deletions
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue