2018-10-17 19:15:50 +02:00
|
|
|
using Ryujinx.Common.Logging;
|
2018-08-17 01:47:36 +02:00
|
|
|
using Ryujinx.HLE.HOS.Ipc;
|
|
|
|
using Ryujinx.HLE.HOS.Kernel;
|
2018-06-11 02:46:42 +02:00
|
|
|
using Ryujinx.HLE.Input;
|
2018-09-21 02:08:35 +02:00
|
|
|
using System;
|
2018-02-25 05:34:16 +01:00
|
|
|
using System.Collections.Generic;
|
|
|
|
|
2018-08-17 01:47:36 +02:00
|
|
|
namespace Ryujinx.HLE.HOS.Services.Hid
|
2018-02-25 05:34:16 +01:00
|
|
|
{
|
2018-09-19 01:36:43 +02:00
|
|
|
class IHidServer : IpcService
|
2018-02-25 05:34:16 +01:00
|
|
|
{
|
2018-12-05 01:52:39 +01:00
|
|
|
private Dictionary<int, ServiceProcessRequest> m_Commands;
|
2018-02-25 05:34:16 +01:00
|
|
|
|
2018-12-05 01:52:39 +01:00
|
|
|
private KEvent NpadStyleSetUpdateEvent;
|
|
|
|
private KEvent XpadIdEvent;
|
|
|
|
private KEvent PalmaOperationCompleteEvent;
|
2018-09-21 02:08:35 +02:00
|
|
|
|
2018-12-05 01:52:39 +01:00
|
|
|
private int XpadIdEventHandle;
|
2018-09-21 02:08:35 +02:00
|
|
|
|
2018-12-05 01:52:39 +01:00
|
|
|
private bool SixAxisSensorFusionEnabled;
|
|
|
|
private bool UnintendedHomeButtonInputProtectionEnabled;
|
|
|
|
private bool VibrationPermitted;
|
|
|
|
private bool UsbFullKeyControllerEnabled;
|
2018-09-21 02:08:35 +02:00
|
|
|
|
2018-12-05 01:52:39 +01:00
|
|
|
private HidNpadJoyHoldType NpadJoyHoldType;
|
|
|
|
private HidNpadStyle NpadStyleSet;
|
|
|
|
private HidNpadJoyAssignmentMode NpadJoyAssignmentMode;
|
|
|
|
private HidNpadHandheldActivationMode NpadHandheldActivationMode;
|
|
|
|
private HidGyroscopeZeroDriftMode GyroscopeZeroDriftMode;
|
2018-09-21 02:08:35 +02:00
|
|
|
|
2018-12-05 01:52:39 +01:00
|
|
|
private long NpadCommunicationMode;
|
|
|
|
private uint AccelerometerPlayMode;
|
|
|
|
private long VibrationGcErmCommand;
|
|
|
|
private float SevenSixAxisSensorFusionStrength;
|
2018-09-21 02:08:35 +02:00
|
|
|
|
2018-12-05 01:52:39 +01:00
|
|
|
private HidSensorFusionParameters SensorFusionParams;
|
|
|
|
private HidAccelerometerParameters AccelerometerParams;
|
|
|
|
private HidVibrationValue VibrationValue;
|
2018-08-13 23:31:09 +02:00
|
|
|
|
2018-12-05 01:52:39 +01:00
|
|
|
public override IReadOnlyDictionary<int, ServiceProcessRequest> Commands => m_Commands;
|
2018-02-25 05:34:16 +01:00
|
|
|
|
2018-12-05 01:52:39 +01:00
|
|
|
public IHidServer(Horizon System)
|
2018-02-25 05:34:16 +01:00
|
|
|
{
|
2018-12-05 01:52:39 +01:00
|
|
|
m_Commands = new Dictionary<int, ServiceProcessRequest>()
|
2018-02-25 05:34:16 +01:00
|
|
|
{
|
2018-09-21 02:08:35 +02:00
|
|
|
{ 0, CreateAppletResource },
|
|
|
|
{ 1, ActivateDebugPad },
|
|
|
|
{ 11, ActivateTouchScreen },
|
|
|
|
{ 21, ActivateMouse },
|
|
|
|
{ 31, ActivateKeyboard },
|
|
|
|
{ 40, AcquireXpadIdEventHandle },
|
|
|
|
{ 41, ReleaseXpadIdEventHandle },
|
|
|
|
{ 51, ActivateXpad },
|
|
|
|
{ 55, GetXpadIds },
|
|
|
|
{ 56, ActivateJoyXpad },
|
|
|
|
{ 58, GetJoyXpadLifoHandle },
|
|
|
|
{ 59, GetJoyXpadIds },
|
|
|
|
{ 60, ActivateSixAxisSensor },
|
|
|
|
{ 61, DeactivateSixAxisSensor },
|
|
|
|
{ 62, GetSixAxisSensorLifoHandle },
|
|
|
|
{ 63, ActivateJoySixAxisSensor },
|
|
|
|
{ 64, DeactivateJoySixAxisSensor },
|
|
|
|
{ 65, GetJoySixAxisSensorLifoHandle },
|
|
|
|
{ 66, StartSixAxisSensor },
|
|
|
|
{ 67, StopSixAxisSensor },
|
|
|
|
{ 68, IsSixAxisSensorFusionEnabled },
|
|
|
|
{ 69, EnableSixAxisSensorFusion },
|
|
|
|
{ 70, SetSixAxisSensorFusionParameters },
|
|
|
|
{ 71, GetSixAxisSensorFusionParameters },
|
|
|
|
{ 72, ResetSixAxisSensorFusionParameters },
|
|
|
|
{ 73, SetAccelerometerParameters },
|
|
|
|
{ 74, GetAccelerometerParameters },
|
|
|
|
{ 75, ResetAccelerometerParameters },
|
|
|
|
{ 76, SetAccelerometerPlayMode },
|
|
|
|
{ 77, GetAccelerometerPlayMode },
|
|
|
|
{ 78, ResetAccelerometerPlayMode },
|
|
|
|
{ 79, SetGyroscopeZeroDriftMode },
|
|
|
|
{ 80, GetGyroscopeZeroDriftMode },
|
|
|
|
{ 81, ResetGyroscopeZeroDriftMode },
|
|
|
|
{ 82, IsSixAxisSensorAtRest },
|
|
|
|
{ 91, ActivateGesture },
|
|
|
|
{ 100, SetSupportedNpadStyleSet },
|
|
|
|
{ 101, GetSupportedNpadStyleSet },
|
|
|
|
{ 102, SetSupportedNpadIdType },
|
|
|
|
{ 103, ActivateNpad },
|
|
|
|
{ 104, DeactivateNpad },
|
|
|
|
{ 106, AcquireNpadStyleSetUpdateEventHandle },
|
|
|
|
{ 107, DisconnectNpad },
|
|
|
|
{ 108, GetPlayerLedPattern },
|
|
|
|
{ 109, ActivateNpadWithRevision },
|
|
|
|
{ 120, SetNpadJoyHoldType },
|
|
|
|
{ 121, GetNpadJoyHoldType },
|
|
|
|
{ 122, SetNpadJoyAssignmentModeSingleByDefault },
|
|
|
|
{ 123, SetNpadJoyAssignmentModeSingle },
|
|
|
|
{ 124, SetNpadJoyAssignmentModeDual },
|
|
|
|
{ 125, MergeSingleJoyAsDualJoy },
|
|
|
|
{ 126, StartLrAssignmentMode },
|
|
|
|
{ 127, StopLrAssignmentMode },
|
|
|
|
{ 128, SetNpadHandheldActivationMode },
|
|
|
|
{ 129, GetNpadHandheldActivationMode },
|
|
|
|
{ 130, SwapNpadAssignment },
|
|
|
|
{ 131, IsUnintendedHomeButtonInputProtectionEnabled },
|
|
|
|
{ 132, EnableUnintendedHomeButtonInputProtection },
|
|
|
|
{ 133, SetNpadJoyAssignmentModeSingleWithDestination },
|
|
|
|
{ 200, GetVibrationDeviceInfo },
|
|
|
|
{ 201, SendVibrationValue },
|
|
|
|
{ 202, GetActualVibrationValue },
|
|
|
|
{ 203, CreateActiveVibrationDeviceList },
|
|
|
|
{ 204, PermitVibration },
|
|
|
|
{ 205, IsVibrationPermitted },
|
|
|
|
{ 206, SendVibrationValues },
|
|
|
|
{ 207, SendVibrationGcErmCommand },
|
|
|
|
{ 208, GetActualVibrationGcErmCommand },
|
|
|
|
{ 209, BeginPermitVibrationSession },
|
|
|
|
{ 210, EndPermitVibrationSession },
|
|
|
|
{ 300, ActivateConsoleSixAxisSensor },
|
|
|
|
{ 301, StartConsoleSixAxisSensor },
|
|
|
|
{ 302, StopConsoleSixAxisSensor },
|
|
|
|
{ 303, ActivateSevenSixAxisSensor },
|
|
|
|
{ 304, StartSevenSixAxisSensor },
|
|
|
|
{ 305, StopSevenSixAxisSensor },
|
|
|
|
{ 306, InitializeSevenSixAxisSensor },
|
|
|
|
{ 307, FinalizeSevenSixAxisSensor },
|
|
|
|
{ 308, SetSevenSixAxisSensorFusionStrength },
|
|
|
|
{ 309, GetSevenSixAxisSensorFusionStrength },
|
|
|
|
{ 400, IsUsbFullKeyControllerEnabled },
|
|
|
|
{ 401, EnableUsbFullKeyController },
|
|
|
|
{ 402, IsUsbFullKeyControllerConnected },
|
|
|
|
{ 403, HasBattery },
|
|
|
|
{ 404, HasLeftRightBattery },
|
|
|
|
{ 405, GetNpadInterfaceType },
|
|
|
|
{ 406, GetNpadLeftRightInterfaceType },
|
|
|
|
{ 500, GetPalmaConnectionHandle },
|
|
|
|
{ 501, InitializePalma },
|
|
|
|
{ 502, AcquirePalmaOperationCompleteEvent },
|
|
|
|
{ 503, GetPalmaOperationInfo },
|
|
|
|
{ 504, PlayPalmaActivity },
|
|
|
|
{ 505, SetPalmaFrModeType },
|
|
|
|
{ 506, ReadPalmaStep },
|
|
|
|
{ 507, EnablePalmaStep },
|
|
|
|
{ 508, SuspendPalmaStep },
|
|
|
|
{ 509, ResetPalmaStep },
|
|
|
|
{ 510, ReadPalmaApplicationSection },
|
|
|
|
{ 511, WritePalmaApplicationSection },
|
|
|
|
{ 512, ReadPalmaUniqueCode },
|
|
|
|
{ 513, SetPalmaUniqueCodeInvalid },
|
|
|
|
{ 1000, SetNpadCommunicationMode },
|
2018-12-05 01:52:39 +01:00
|
|
|
{ 1001, GetNpadCommunicationMode },
|
2018-02-25 05:34:16 +01:00
|
|
|
};
|
2018-08-13 23:31:09 +02:00
|
|
|
|
2018-12-05 01:52:39 +01:00
|
|
|
NpadStyleSetUpdateEvent = new KEvent(System);
|
|
|
|
XpadIdEvent = new KEvent(System);
|
|
|
|
PalmaOperationCompleteEvent = new KEvent(System);
|
2018-09-21 02:08:35 +02:00
|
|
|
|
2018-12-05 01:52:39 +01:00
|
|
|
NpadJoyHoldType = HidNpadJoyHoldType.Vertical;
|
|
|
|
NpadStyleSet = HidNpadStyle.FullKey | HidNpadStyle.Dual | HidNpadStyle.Left | HidNpadStyle.Right | HidNpadStyle.Handheld;
|
|
|
|
NpadJoyAssignmentMode = HidNpadJoyAssignmentMode.Dual;
|
|
|
|
NpadHandheldActivationMode = HidNpadHandheldActivationMode.Dual;
|
|
|
|
GyroscopeZeroDriftMode = HidGyroscopeZeroDriftMode.Standard;
|
2018-09-21 02:08:35 +02:00
|
|
|
|
2018-12-05 01:52:39 +01:00
|
|
|
SensorFusionParams = new HidSensorFusionParameters();
|
|
|
|
AccelerometerParams = new HidAccelerometerParameters();
|
|
|
|
VibrationValue = new HidVibrationValue();
|
2018-11-20 01:01:36 +01:00
|
|
|
|
|
|
|
// TODO: signal event at right place
|
2018-12-05 01:52:39 +01:00
|
|
|
XpadIdEvent.ReadableEvent.Signal();
|
2018-02-25 05:34:16 +01:00
|
|
|
}
|
|
|
|
|
2018-09-21 02:08:35 +02:00
|
|
|
// CreateAppletResource(nn::applet::AppletResourceUserId) -> object<nn::hid::IAppletResource>
|
2018-12-05 01:52:39 +01:00
|
|
|
public long CreateAppletResource(ServiceCtx Context)
|
2018-02-25 05:34:16 +01:00
|
|
|
{
|
2018-12-05 01:52:39 +01:00
|
|
|
long AppletResourceUserId = Context.RequestData.ReadInt64();
|
2018-09-21 02:08:35 +02:00
|
|
|
|
2018-12-05 01:52:39 +01:00
|
|
|
MakeObject(Context, new IAppletResource(Context.Device.System.HidSharedMem));
|
2018-02-25 05:34:16 +01:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2018-09-21 02:08:35 +02:00
|
|
|
// ActivateDebugPad(nn::applet::AppletResourceUserId)
|
2018-12-05 01:52:39 +01:00
|
|
|
public long ActivateDebugPad(ServiceCtx Context)
|
2018-04-05 00:16:59 +02:00
|
|
|
{
|
2018-12-05 01:52:39 +01:00
|
|
|
long AppletResourceUserId = Context.RequestData.ReadInt64();
|
2018-09-21 02:08:35 +02:00
|
|
|
|
2018-12-05 01:52:39 +01:00
|
|
|
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. AppletResourceUserId: {AppletResourceUserId}");
|
2018-04-17 02:24:42 +02:00
|
|
|
|
2018-04-05 00:16:59 +02:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2018-09-21 02:08:35 +02:00
|
|
|
// ActivateTouchScreen(nn::applet::AppletResourceUserId)
|
2018-12-05 01:52:39 +01:00
|
|
|
public long ActivateTouchScreen(ServiceCtx Context)
|
2018-02-25 05:34:16 +01:00
|
|
|
{
|
2018-12-05 01:52:39 +01:00
|
|
|
long AppletResourceUserId = Context.RequestData.ReadInt64();
|
2018-04-05 00:39:47 +02:00
|
|
|
|
2018-12-05 01:52:39 +01:00
|
|
|
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. AppletResourceUserId: {AppletResourceUserId}");
|
2018-04-17 02:24:42 +02:00
|
|
|
|
2018-04-05 00:39:47 +02:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2018-09-21 02:08:35 +02:00
|
|
|
// ActivateMouse(nn::applet::AppletResourceUserId)
|
2018-12-05 01:52:39 +01:00
|
|
|
public long ActivateMouse(ServiceCtx Context)
|
2018-04-05 00:39:47 +02:00
|
|
|
{
|
2018-12-05 01:52:39 +01:00
|
|
|
long AppletResourceUserId = Context.RequestData.ReadInt64();
|
2018-02-25 05:34:16 +01:00
|
|
|
|
2018-12-05 01:52:39 +01:00
|
|
|
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. AppletResourceUserId: {AppletResourceUserId}");
|
2018-04-17 02:24:42 +02:00
|
|
|
|
2018-02-25 05:34:16 +01:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2018-09-21 02:08:35 +02:00
|
|
|
// ActivateKeyboard(nn::applet::AppletResourceUserId)
|
2018-12-05 01:52:39 +01:00
|
|
|
public long ActivateKeyboard(ServiceCtx Context)
|
2018-04-05 00:44:02 +02:00
|
|
|
{
|
2018-12-05 01:52:39 +01:00
|
|
|
long AppletResourceUserId = Context.RequestData.ReadInt64();
|
2018-04-05 00:44:02 +02:00
|
|
|
|
2018-12-05 01:52:39 +01:00
|
|
|
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. AppletResourceUserId: {AppletResourceUserId}");
|
2018-09-21 02:08:35 +02:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
// AcquireXpadIdEventHandle(ulong XpadId) -> nn::sf::NativeHandle
|
2018-12-05 01:52:39 +01:00
|
|
|
public long AcquireXpadIdEventHandle(ServiceCtx Context)
|
2018-09-21 02:08:35 +02:00
|
|
|
{
|
2018-12-05 01:52:39 +01:00
|
|
|
long XpadId = Context.RequestData.ReadInt64();
|
2018-09-21 02:08:35 +02:00
|
|
|
|
2018-12-05 01:52:39 +01:00
|
|
|
if (Context.Process.HandleTable.GenerateHandle(XpadIdEvent.ReadableEvent, out XpadIdEventHandle) != KernelResult.Success)
|
2018-09-23 20:11:46 +02:00
|
|
|
{
|
|
|
|
throw new InvalidOperationException("Out of handles!");
|
|
|
|
}
|
2018-09-21 02:08:35 +02:00
|
|
|
|
2018-12-05 01:52:39 +01:00
|
|
|
Context.Response.HandleDesc = IpcHandleDesc.MakeCopy(XpadIdEventHandle);
|
2018-09-21 02:08:35 +02:00
|
|
|
|
2018-12-05 01:52:39 +01:00
|
|
|
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. XpadId: {XpadId}");
|
2018-09-21 02:08:35 +02:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
// ReleaseXpadIdEventHandle(ulong XpadId)
|
2018-12-05 01:52:39 +01:00
|
|
|
public long ReleaseXpadIdEventHandle(ServiceCtx Context)
|
2018-09-21 02:08:35 +02:00
|
|
|
{
|
2018-12-05 01:52:39 +01:00
|
|
|
long XpadId = Context.RequestData.ReadInt64();
|
2018-09-21 02:08:35 +02:00
|
|
|
|
2018-12-05 01:52:39 +01:00
|
|
|
Context.Process.HandleTable.CloseHandle(XpadIdEventHandle);
|
2018-09-21 02:08:35 +02:00
|
|
|
|
2018-12-05 01:52:39 +01:00
|
|
|
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. XpadId: {XpadId}");
|
2018-09-21 02:08:35 +02:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
// ActivateXpad(nn::hid::BasicXpadId, nn::applet::AppletResourceUserId)
|
2018-12-05 01:52:39 +01:00
|
|
|
public long ActivateXpad(ServiceCtx Context)
|
2018-09-21 02:08:35 +02:00
|
|
|
{
|
2018-12-05 01:52:39 +01:00
|
|
|
int BasicXpadId = Context.RequestData.ReadInt32();
|
|
|
|
long AppletResourceUserId = Context.RequestData.ReadInt64();
|
2018-09-21 02:08:35 +02:00
|
|
|
|
2018-12-05 01:52:39 +01:00
|
|
|
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. AppletResourceUserId: {AppletResourceUserId} - " +
|
|
|
|
$"BasicXpadId: {BasicXpadId}");
|
2018-09-21 02:08:35 +02:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
// GetXpadIds() -> long IdsCount, buffer<array<nn::hid::BasicXpadId>, type: 0xa>
|
2018-12-05 01:52:39 +01:00
|
|
|
public long GetXpadIds(ServiceCtx Context)
|
2018-09-21 02:08:35 +02:00
|
|
|
{
|
|
|
|
// There is any Xpad, so we return 0 and write nothing inside the type-0xa buffer.
|
2018-12-05 01:52:39 +01:00
|
|
|
Context.ResponseData.Write(0L);
|
2018-09-21 02:08:35 +02:00
|
|
|
|
2018-10-17 19:15:50 +02:00
|
|
|
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed.");
|
2018-09-21 02:08:35 +02:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
// ActivateJoyXpad(nn::hid::JoyXpadId)
|
2018-12-05 01:52:39 +01:00
|
|
|
public long ActivateJoyXpad(ServiceCtx Context)
|
2018-09-21 02:08:35 +02:00
|
|
|
{
|
2018-12-05 01:52:39 +01:00
|
|
|
int JoyXpadId = Context.RequestData.ReadInt32();
|
2018-09-21 02:08:35 +02:00
|
|
|
|
2018-12-05 01:52:39 +01:00
|
|
|
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. JoyXpadId: {JoyXpadId}");
|
2018-09-21 02:08:35 +02:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
// GetJoyXpadLifoHandle(nn::hid::JoyXpadId) -> nn::sf::NativeHandle
|
2018-12-05 01:52:39 +01:00
|
|
|
public long GetJoyXpadLifoHandle(ServiceCtx Context)
|
2018-09-21 02:08:35 +02:00
|
|
|
{
|
2018-12-05 01:52:39 +01:00
|
|
|
int JoyXpadId = Context.RequestData.ReadInt32();
|
2018-09-21 02:08:35 +02:00
|
|
|
|
2018-12-05 01:52:39 +01:00
|
|
|
int Handle = 0;
|
2018-09-21 02:08:35 +02:00
|
|
|
|
2018-12-05 01:52:39 +01:00
|
|
|
Context.Response.HandleDesc = IpcHandleDesc.MakeCopy(Handle);
|
2018-09-21 02:08:35 +02:00
|
|
|
|
2018-12-05 01:52:39 +01:00
|
|
|
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. JoyXpadId: {JoyXpadId}");
|
2018-09-21 02:08:35 +02:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
// GetJoyXpadIds() -> long IdsCount, buffer<array<nn::hid::JoyXpadId>, type: 0xa>
|
2018-12-05 01:52:39 +01:00
|
|
|
public long GetJoyXpadIds(ServiceCtx Context)
|
2018-09-21 02:08:35 +02:00
|
|
|
{
|
|
|
|
// There is any JoyXpad, so we return 0 and write nothing inside the type-0xa buffer.
|
2018-12-05 01:52:39 +01:00
|
|
|
Context.ResponseData.Write(0L);
|
2018-09-21 02:08:35 +02:00
|
|
|
|
2018-10-17 19:15:50 +02:00
|
|
|
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed.");
|
2018-09-21 02:08:35 +02:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
// ActivateSixAxisSensor(nn::hid::BasicXpadId)
|
2018-12-05 01:52:39 +01:00
|
|
|
public long ActivateSixAxisSensor(ServiceCtx Context)
|
2018-09-21 02:08:35 +02:00
|
|
|
{
|
2018-12-05 01:52:39 +01:00
|
|
|
int BasicXpadId = Context.RequestData.ReadInt32();
|
2018-09-21 02:08:35 +02:00
|
|
|
|
2018-12-05 01:52:39 +01:00
|
|
|
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. BasicXpadId: {BasicXpadId}");
|
2018-09-21 02:08:35 +02:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
// DeactivateSixAxisSensor(nn::hid::BasicXpadId)
|
2018-12-05 01:52:39 +01:00
|
|
|
public long DeactivateSixAxisSensor(ServiceCtx Context)
|
2018-09-21 02:08:35 +02:00
|
|
|
{
|
2018-12-05 01:52:39 +01:00
|
|
|
int BasicXpadId = Context.RequestData.ReadInt32();
|
2018-09-21 02:08:35 +02:00
|
|
|
|
2018-12-05 01:52:39 +01:00
|
|
|
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. BasicXpadId: {BasicXpadId}");
|
2018-09-21 02:08:35 +02:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
// GetSixAxisSensorLifoHandle(nn::hid::BasicXpadId) -> nn::sf::NativeHandle
|
2018-12-05 01:52:39 +01:00
|
|
|
public long GetSixAxisSensorLifoHandle(ServiceCtx Context)
|
2018-09-21 02:08:35 +02:00
|
|
|
{
|
2018-12-05 01:52:39 +01:00
|
|
|
int BasicXpadId = Context.RequestData.ReadInt32();
|
2018-09-21 02:08:35 +02:00
|
|
|
|
2018-12-05 01:52:39 +01:00
|
|
|
int Handle = 0;
|
2018-09-21 02:08:35 +02:00
|
|
|
|
2018-12-05 01:52:39 +01:00
|
|
|
Context.Response.HandleDesc = IpcHandleDesc.MakeCopy(Handle);
|
2018-09-21 02:08:35 +02:00
|
|
|
|
2018-12-05 01:52:39 +01:00
|
|
|
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. BasicXpadId: {BasicXpadId}");
|
2018-09-21 02:08:35 +02:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
// ActivateJoySixAxisSensor(nn::hid::JoyXpadId)
|
2018-12-05 01:52:39 +01:00
|
|
|
public long ActivateJoySixAxisSensor(ServiceCtx Context)
|
2018-09-21 02:08:35 +02:00
|
|
|
{
|
2018-12-05 01:52:39 +01:00
|
|
|
int JoyXpadId = Context.RequestData.ReadInt32();
|
2018-09-21 02:08:35 +02:00
|
|
|
|
2018-12-05 01:52:39 +01:00
|
|
|
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. JoyXpadId: {JoyXpadId}");
|
2018-09-21 02:08:35 +02:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
// DeactivateJoySixAxisSensor(nn::hid::JoyXpadId)
|
2018-12-05 01:52:39 +01:00
|
|
|
public long DeactivateJoySixAxisSensor(ServiceCtx Context)
|
2018-09-21 02:08:35 +02:00
|
|
|
{
|
2018-12-05 01:52:39 +01:00
|
|
|
int JoyXpadId = Context.RequestData.ReadInt32();
|
2018-09-21 02:08:35 +02:00
|
|
|
|
2018-12-05 01:52:39 +01:00
|
|
|
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. JoyXpadId: {JoyXpadId}");
|
2018-09-21 02:08:35 +02:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
// GetJoySixAxisSensorLifoHandle(nn::hid::JoyXpadId) -> nn::sf::NativeHandle
|
2018-12-05 01:52:39 +01:00
|
|
|
public long GetJoySixAxisSensorLifoHandle(ServiceCtx Context)
|
2018-09-21 02:08:35 +02:00
|
|
|
{
|
2018-12-05 01:52:39 +01:00
|
|
|
int JoyXpadId = Context.RequestData.ReadInt32();
|
2018-09-21 02:08:35 +02:00
|
|
|
|
2018-12-05 01:52:39 +01:00
|
|
|
int Handle = 0;
|
2018-09-21 02:08:35 +02:00
|
|
|
|
2018-12-05 01:52:39 +01:00
|
|
|
Context.Response.HandleDesc = IpcHandleDesc.MakeCopy(Handle);
|
2018-09-21 02:08:35 +02:00
|
|
|
|
2018-12-05 01:52:39 +01:00
|
|
|
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. JoyXpadId: {JoyXpadId}");
|
2018-04-17 02:24:42 +02:00
|
|
|
|
2018-04-05 00:44:02 +02:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2018-09-21 02:08:35 +02:00
|
|
|
// StartSixAxisSensor(nn::hid::SixAxisSensorHandle, nn::applet::AppletResourceUserId)
|
2018-12-05 01:52:39 +01:00
|
|
|
public long StartSixAxisSensor(ServiceCtx Context)
|
2018-03-14 01:26:14 +01:00
|
|
|
{
|
2018-12-05 01:52:39 +01:00
|
|
|
int SixAxisSensorHandle = Context.RequestData.ReadInt32();
|
|
|
|
long AppletResourceUserId = Context.RequestData.ReadInt64();
|
2018-09-21 02:08:35 +02:00
|
|
|
|
2018-12-05 01:52:39 +01:00
|
|
|
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. AppletResourceUserId: {AppletResourceUserId} - " +
|
|
|
|
$"SixAxisSensorHandle: {SixAxisSensorHandle}");
|
2018-09-21 02:08:35 +02:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
2018-03-14 01:26:14 +01:00
|
|
|
|
2018-09-21 02:08:35 +02:00
|
|
|
// StopSixAxisSensor(nn::hid::SixAxisSensorHandle, nn::applet::AppletResourceUserId)
|
2018-12-05 01:52:39 +01:00
|
|
|
public long StopSixAxisSensor(ServiceCtx Context)
|
2018-09-21 02:08:35 +02:00
|
|
|
{
|
2018-12-05 01:52:39 +01:00
|
|
|
int SixAxisSensorHandle = Context.RequestData.ReadInt32();
|
|
|
|
long AppletResourceUserId = Context.RequestData.ReadInt64();
|
2018-03-14 01:26:14 +01:00
|
|
|
|
2018-12-05 01:52:39 +01:00
|
|
|
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. AppletResourceUserId: {AppletResourceUserId} - " +
|
|
|
|
$"SixAxisSensorHandle: {SixAxisSensorHandle}");
|
2018-04-17 02:24:42 +02:00
|
|
|
|
2018-03-14 01:26:14 +01:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2018-09-21 02:08:35 +02:00
|
|
|
// IsSixAxisSensorFusionEnabled(nn::hid::SixAxisSensorHandle, nn::applet::AppletResourceUserId) -> bool IsEnabled
|
2018-12-05 01:52:39 +01:00
|
|
|
public long IsSixAxisSensorFusionEnabled(ServiceCtx Context)
|
2018-04-17 18:40:22 +02:00
|
|
|
{
|
2018-12-05 01:52:39 +01:00
|
|
|
int SixAxisSensorHandle = Context.RequestData.ReadInt32();
|
|
|
|
long AppletResourceUserId = Context.RequestData.ReadInt64();
|
2018-04-17 18:40:22 +02:00
|
|
|
|
2018-12-05 01:52:39 +01:00
|
|
|
Context.ResponseData.Write(SixAxisSensorFusionEnabled);
|
2018-09-21 02:08:35 +02:00
|
|
|
|
2018-12-05 01:52:39 +01:00
|
|
|
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. AppletResourceUserId: {AppletResourceUserId} - " +
|
|
|
|
$"SixAxisSensorHandle: {SixAxisSensorHandle} - " +
|
|
|
|
$"SixAxisSensorFusionEnabled: {SixAxisSensorFusionEnabled}");
|
2018-04-17 18:40:22 +02:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2018-09-21 02:08:35 +02:00
|
|
|
// EnableSixAxisSensorFusion(bool Enabled, nn::hid::SixAxisSensorHandle, nn::applet::AppletResourceUserId)
|
2018-12-05 01:52:39 +01:00
|
|
|
public long EnableSixAxisSensorFusion(ServiceCtx Context)
|
2018-08-13 23:31:09 +02:00
|
|
|
{
|
2018-12-05 01:52:39 +01:00
|
|
|
SixAxisSensorFusionEnabled = Context.RequestData.ReadBoolean();
|
|
|
|
int SixAxisSensorHandle = Context.RequestData.ReadInt32();
|
|
|
|
long AppletResourceUserId = Context.RequestData.ReadInt64();
|
2018-09-23 20:11:46 +02:00
|
|
|
|
2018-12-05 01:52:39 +01:00
|
|
|
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. AppletResourceUserId: {AppletResourceUserId} - " +
|
|
|
|
$"SixAxisSensorHandle: {SixAxisSensorHandle} - " +
|
|
|
|
$"SixAxisSensorFusionEnabled: {SixAxisSensorFusionEnabled}");
|
2018-08-13 23:31:09 +02:00
|
|
|
|
2018-09-21 02:08:35 +02:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
// SetSixAxisSensorFusionParameters(nn::hid::SixAxisSensorHandle, float RevisePower, float ReviseRange, nn::applet::AppletResourceUserId)
|
2018-12-05 01:52:39 +01:00
|
|
|
public long SetSixAxisSensorFusionParameters(ServiceCtx Context)
|
2018-09-21 02:08:35 +02:00
|
|
|
{
|
2018-12-05 01:52:39 +01:00
|
|
|
int SixAxisSensorHandle = Context.RequestData.ReadInt32();
|
2018-09-21 02:08:35 +02:00
|
|
|
|
2018-12-05 01:52:39 +01:00
|
|
|
SensorFusionParams = new HidSensorFusionParameters()
|
2018-09-21 02:08:35 +02:00
|
|
|
{
|
2018-12-05 01:52:39 +01:00
|
|
|
RevisePower = Context.RequestData.ReadInt32(),
|
|
|
|
ReviseRange = Context.RequestData.ReadInt32(),
|
2018-09-21 02:08:35 +02:00
|
|
|
};
|
|
|
|
|
2018-12-05 01:52:39 +01:00
|
|
|
long AppletResourceUserId = Context.RequestData.ReadInt64();
|
2018-09-21 02:08:35 +02:00
|
|
|
|
2018-12-05 01:52:39 +01:00
|
|
|
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. AppletResourceUserId: {AppletResourceUserId} - " +
|
|
|
|
$"SixAxisSensorHandle: {SixAxisSensorHandle} - " +
|
|
|
|
$"RevisePower: {SensorFusionParams.RevisePower} - " +
|
|
|
|
$"ReviseRange: {SensorFusionParams.ReviseRange}");
|
2018-08-13 23:31:09 +02:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2018-09-21 02:08:35 +02:00
|
|
|
// GetSixAxisSensorFusionParameters(nn::hid::SixAxisSensorHandle, nn::applet::AppletResourceUserId) -> float RevisePower, float ReviseRange)
|
2018-12-05 01:52:39 +01:00
|
|
|
public long GetSixAxisSensorFusionParameters(ServiceCtx Context)
|
2018-09-21 02:08:35 +02:00
|
|
|
{
|
2018-12-05 01:52:39 +01:00
|
|
|
int SixAxisSensorHandle = Context.RequestData.ReadInt32();
|
|
|
|
long AppletResourceUserId = Context.RequestData.ReadInt64();
|
2018-09-21 02:08:35 +02:00
|
|
|
|
2018-12-05 01:52:39 +01:00
|
|
|
Context.ResponseData.Write(SensorFusionParams.RevisePower);
|
|
|
|
Context.ResponseData.Write(SensorFusionParams.ReviseRange);
|
2018-09-21 02:08:35 +02:00
|
|
|
|
2018-12-05 01:52:39 +01:00
|
|
|
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. AppletResourceUserId: {AppletResourceUserId} - " +
|
|
|
|
$"SixAxisSensorHandle: {SixAxisSensorHandle} - " +
|
|
|
|
$"RevisePower: {SensorFusionParams.RevisePower} - " +
|
|
|
|
$"ReviseRange: {SensorFusionParams.ReviseRange}");
|
2018-09-21 02:08:35 +02:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
// ResetSixAxisSensorFusionParameters(nn::hid::SixAxisSensorHandle, nn::applet::AppletResourceUserId)
|
2018-12-05 01:52:39 +01:00
|
|
|
public long ResetSixAxisSensorFusionParameters(ServiceCtx Context)
|
2018-02-25 05:34:16 +01:00
|
|
|
{
|
2018-12-05 01:52:39 +01:00
|
|
|
int SixAxisSensorHandle = Context.RequestData.ReadInt32();
|
|
|
|
long AppletResourceUserId = Context.RequestData.ReadInt64();
|
2018-02-25 05:34:16 +01:00
|
|
|
|
2018-12-05 01:52:39 +01:00
|
|
|
SensorFusionParams.RevisePower = 0;
|
|
|
|
SensorFusionParams.ReviseRange = 0;
|
2018-09-21 02:08:35 +02:00
|
|
|
|
2018-12-05 01:52:39 +01:00
|
|
|
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. AppletResourceUserId: {AppletResourceUserId} - " +
|
|
|
|
$"SixAxisSensorHandle: {SixAxisSensorHandle} - " +
|
|
|
|
$"RevisePower: {SensorFusionParams.RevisePower} - " +
|
|
|
|
$"ReviseRange: {SensorFusionParams.ReviseRange}");
|
2018-04-17 02:24:42 +02:00
|
|
|
|
2018-02-25 05:34:16 +01:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2018-09-21 02:08:35 +02:00
|
|
|
// SetAccelerometerParameters(nn::hid::SixAxisSensorHandle, float X, float Y, nn::applet::AppletResourceUserId)
|
2018-12-05 01:52:39 +01:00
|
|
|
public long SetAccelerometerParameters(ServiceCtx Context)
|
2018-02-25 05:34:16 +01:00
|
|
|
{
|
2018-12-05 01:52:39 +01:00
|
|
|
int SixAxisSensorHandle = Context.RequestData.ReadInt32();
|
2018-09-21 02:08:35 +02:00
|
|
|
|
2018-12-05 01:52:39 +01:00
|
|
|
AccelerometerParams = new HidAccelerometerParameters()
|
2018-09-21 02:08:35 +02:00
|
|
|
{
|
2018-12-05 01:52:39 +01:00
|
|
|
X = Context.RequestData.ReadInt32(),
|
|
|
|
Y = Context.RequestData.ReadInt32(),
|
2018-09-21 02:08:35 +02:00
|
|
|
};
|
|
|
|
|
2018-12-05 01:52:39 +01:00
|
|
|
long AppletResourceUserId = Context.RequestData.ReadInt64();
|
2018-02-25 05:34:16 +01:00
|
|
|
|
2018-12-05 01:52:39 +01:00
|
|
|
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. AppletResourceUserId: {AppletResourceUserId} - " +
|
|
|
|
$"SixAxisSensorHandle: {SixAxisSensorHandle} - " +
|
|
|
|
$"X: {AccelerometerParams.X} - " +
|
|
|
|
$"Y: {AccelerometerParams.Y}");
|
2018-04-17 02:24:42 +02:00
|
|
|
|
2018-02-25 05:34:16 +01:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2018-09-21 02:08:35 +02:00
|
|
|
// GetAccelerometerParameters(nn::hid::SixAxisSensorHandle, nn::applet::AppletResourceUserId) -> float X, float Y
|
2018-12-05 01:52:39 +01:00
|
|
|
public long GetAccelerometerParameters(ServiceCtx Context)
|
2018-02-25 05:34:16 +01:00
|
|
|
{
|
2018-12-05 01:52:39 +01:00
|
|
|
int SixAxisSensorHandle = Context.RequestData.ReadInt32();
|
|
|
|
long AppletResourceUserId = Context.RequestData.ReadInt64();
|
2018-09-21 02:08:35 +02:00
|
|
|
|
2018-12-05 01:52:39 +01:00
|
|
|
Context.ResponseData.Write(AccelerometerParams.X);
|
|
|
|
Context.ResponseData.Write(AccelerometerParams.Y);
|
2018-02-25 05:34:16 +01:00
|
|
|
|
2018-12-05 01:52:39 +01:00
|
|
|
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. AppletResourceUserId: {AppletResourceUserId} - " +
|
|
|
|
$"SixAxisSensorHandle: {SixAxisSensorHandle} - " +
|
|
|
|
$"X: {AccelerometerParams.X} - " +
|
|
|
|
$"Y: {AccelerometerParams.Y}");
|
2018-04-17 02:24:42 +02:00
|
|
|
|
2018-02-25 05:34:16 +01:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2018-09-21 02:08:35 +02:00
|
|
|
// ResetAccelerometerParameters(nn::hid::SixAxisSensorHandle, nn::applet::AppletResourceUserId)
|
2018-12-05 01:52:39 +01:00
|
|
|
public long ResetAccelerometerParameters(ServiceCtx Context)
|
2018-02-25 05:34:16 +01:00
|
|
|
{
|
2018-12-05 01:52:39 +01:00
|
|
|
int SixAxisSensorHandle = Context.RequestData.ReadInt32();
|
|
|
|
long AppletResourceUserId = Context.RequestData.ReadInt64();
|
2018-02-25 05:34:16 +01:00
|
|
|
|
2018-12-05 01:52:39 +01:00
|
|
|
AccelerometerParams.X = 0;
|
|
|
|
AccelerometerParams.Y = 0;
|
2018-09-21 02:08:35 +02:00
|
|
|
|
2018-12-05 01:52:39 +01:00
|
|
|
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. AppletResourceUserId: {AppletResourceUserId} - " +
|
|
|
|
$"SixAxisSensorHandle: {SixAxisSensorHandle} - " +
|
|
|
|
$"X: {AccelerometerParams.X} - " +
|
|
|
|
$"Y: {AccelerometerParams.Y}");
|
2018-04-17 02:24:42 +02:00
|
|
|
|
2018-02-25 05:34:16 +01:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2018-09-21 02:08:35 +02:00
|
|
|
// SetAccelerometerPlayMode(nn::hid::SixAxisSensorHandle, uint PlayMode, nn::applet::AppletResourceUserId)
|
2018-12-05 01:52:39 +01:00
|
|
|
public long SetAccelerometerPlayMode(ServiceCtx Context)
|
2018-04-17 18:40:22 +02:00
|
|
|
{
|
2018-12-05 01:52:39 +01:00
|
|
|
int SixAxisSensorHandle = Context.RequestData.ReadInt32();
|
|
|
|
AccelerometerPlayMode = Context.RequestData.ReadUInt32();
|
|
|
|
long AppletResourceUserId = Context.RequestData.ReadInt64();
|
2018-04-17 18:40:22 +02:00
|
|
|
|
2018-12-05 01:52:39 +01:00
|
|
|
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. AppletResourceUserId: {AppletResourceUserId} - " +
|
|
|
|
$"SixAxisSensorHandle: {SixAxisSensorHandle} - " +
|
|
|
|
$"PlayMode: {AccelerometerPlayMode}");
|
2018-09-21 02:08:35 +02:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
// GetAccelerometerPlayMode(nn::hid::SixAxisSensorHandle, nn::applet::AppletResourceUserId) -> uint PlayMode
|
2018-12-05 01:52:39 +01:00
|
|
|
public long GetAccelerometerPlayMode(ServiceCtx Context)
|
2018-09-21 02:08:35 +02:00
|
|
|
{
|
2018-12-05 01:52:39 +01:00
|
|
|
int SixAxisSensorHandle = Context.RequestData.ReadInt32();
|
|
|
|
long AppletResourceUserId = Context.RequestData.ReadInt64();
|
2018-09-21 02:08:35 +02:00
|
|
|
|
2018-12-05 01:52:39 +01:00
|
|
|
Context.ResponseData.Write(AccelerometerPlayMode);
|
2018-04-17 18:40:22 +02:00
|
|
|
|
2018-12-05 01:52:39 +01:00
|
|
|
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. AppletResourceUserId: {AppletResourceUserId} - " +
|
|
|
|
$"SixAxisSensorHandle: {SixAxisSensorHandle} - " +
|
|
|
|
$"PlayMode: {AccelerometerPlayMode}");
|
2018-04-17 18:40:22 +02:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2018-09-21 02:08:35 +02:00
|
|
|
// ResetAccelerometerPlayMode(nn::hid::SixAxisSensorHandle, nn::applet::AppletResourceUserId)
|
2018-12-05 01:52:39 +01:00
|
|
|
public long ResetAccelerometerPlayMode(ServiceCtx Context)
|
2018-02-25 05:34:16 +01:00
|
|
|
{
|
2018-12-05 01:52:39 +01:00
|
|
|
int SixAxisSensorHandle = Context.RequestData.ReadInt32();
|
|
|
|
long AppletResourceUserId = Context.RequestData.ReadInt64();
|
2018-02-25 05:34:16 +01:00
|
|
|
|
2018-12-05 01:52:39 +01:00
|
|
|
AccelerometerPlayMode = 0;
|
2018-09-21 02:08:35 +02:00
|
|
|
|
2018-12-05 01:52:39 +01:00
|
|
|
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. AppletResourceUserId: {AppletResourceUserId} - " +
|
|
|
|
$"SixAxisSensorHandle: {SixAxisSensorHandle} - " +
|
|
|
|
$"PlayMode: {AccelerometerPlayMode}");
|
2018-04-17 02:24:42 +02:00
|
|
|
|
2018-02-25 05:34:16 +01:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2018-09-21 02:08:35 +02:00
|
|
|
// SetGyroscopeZeroDriftMode(nn::hid::SixAxisSensorHandle, uint GyroscopeZeroDriftMode, nn::applet::AppletResourceUserId)
|
2018-12-05 01:52:39 +01:00
|
|
|
public long SetGyroscopeZeroDriftMode(ServiceCtx Context)
|
2018-02-25 05:34:16 +01:00
|
|
|
{
|
2018-12-05 01:52:39 +01:00
|
|
|
int SixAxisSensorHandle = Context.RequestData.ReadInt32();
|
|
|
|
GyroscopeZeroDriftMode = (HidGyroscopeZeroDriftMode)Context.RequestData.ReadInt32();
|
|
|
|
long AppletResourceUserId = Context.RequestData.ReadInt64();
|
2018-02-25 05:34:16 +01:00
|
|
|
|
2018-12-05 01:52:39 +01:00
|
|
|
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. AppletResourceUserId: {AppletResourceUserId} - " +
|
|
|
|
$"SixAxisSensorHandle: {SixAxisSensorHandle} - " +
|
|
|
|
$"GyroscopeZeroDriftMode: {GyroscopeZeroDriftMode}");
|
2018-04-17 02:24:42 +02:00
|
|
|
|
2018-02-25 05:34:16 +01:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2018-09-21 02:08:35 +02:00
|
|
|
// GetGyroscopeZeroDriftMode(nn::applet::AppletResourceUserId, nn::hid::SixAxisSensorHandle) -> int GyroscopeZeroDriftMode
|
2018-12-05 01:52:39 +01:00
|
|
|
public long GetGyroscopeZeroDriftMode(ServiceCtx Context)
|
2018-03-13 22:59:17 +01:00
|
|
|
{
|
2018-12-05 01:52:39 +01:00
|
|
|
int SixAxisSensorHandle = Context.RequestData.ReadInt32();
|
|
|
|
long AppletResourceUserId = Context.RequestData.ReadInt64();
|
2018-04-24 20:57:39 +02:00
|
|
|
|
2018-12-05 01:52:39 +01:00
|
|
|
Context.ResponseData.Write((int)GyroscopeZeroDriftMode);
|
2018-03-13 22:59:17 +01:00
|
|
|
|
2018-12-05 01:52:39 +01:00
|
|
|
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. AppletResourceUserId: {AppletResourceUserId} - " +
|
|
|
|
$"SixAxisSensorHandle: {SixAxisSensorHandle} - " +
|
|
|
|
$"GyroscopeZeroDriftMode: {GyroscopeZeroDriftMode}");
|
2018-04-17 02:24:42 +02:00
|
|
|
|
2018-03-13 22:59:17 +01:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2018-09-21 02:08:35 +02:00
|
|
|
// ResetGyroscopeZeroDriftMode(nn::hid::SixAxisSensorHandle, nn::applet::AppletResourceUserId)
|
2018-12-05 01:52:39 +01:00
|
|
|
public long ResetGyroscopeZeroDriftMode(ServiceCtx Context)
|
2018-03-13 22:59:17 +01:00
|
|
|
{
|
2018-12-05 01:52:39 +01:00
|
|
|
int SixAxisSensorHandle = Context.RequestData.ReadInt32();
|
|
|
|
long AppletResourceUserId = Context.RequestData.ReadInt64();
|
2018-04-24 20:57:39 +02:00
|
|
|
|
2018-12-05 01:52:39 +01:00
|
|
|
GyroscopeZeroDriftMode = HidGyroscopeZeroDriftMode.Standard;
|
2018-04-05 00:39:47 +02:00
|
|
|
|
2018-12-05 01:52:39 +01:00
|
|
|
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. AppletResourceUserId: {AppletResourceUserId} - " +
|
|
|
|
$"SixAxisSensorHandle: {SixAxisSensorHandle} - " +
|
|
|
|
$"GyroscopeZeroDriftMode: {GyroscopeZeroDriftMode}");
|
2018-04-17 02:24:42 +02:00
|
|
|
|
2018-03-13 22:59:17 +01:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2018-09-21 02:08:35 +02:00
|
|
|
// IsSixAxisSensorAtRest(nn::hid::SixAxisSensorHandle, nn::applet::AppletResourceUserId) -> bool IsAsRest
|
2018-12-05 01:52:39 +01:00
|
|
|
public long IsSixAxisSensorAtRest(ServiceCtx Context)
|
2018-09-23 20:11:46 +02:00
|
|
|
{
|
2018-12-05 01:52:39 +01:00
|
|
|
int SixAxisSensorHandle = Context.RequestData.ReadInt32();
|
|
|
|
long AppletResourceUserId = Context.RequestData.ReadInt64();
|
2018-09-21 02:08:35 +02:00
|
|
|
|
2018-12-05 01:52:39 +01:00
|
|
|
bool IsAtRest = true;
|
2018-09-21 02:08:35 +02:00
|
|
|
|
2018-12-05 01:52:39 +01:00
|
|
|
Context.ResponseData.Write(IsAtRest);
|
2018-09-21 02:08:35 +02:00
|
|
|
|
2018-12-05 01:52:39 +01:00
|
|
|
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. AppletResourceUserId: {AppletResourceUserId} - " +
|
|
|
|
$"SixAxisSensorHandle: {SixAxisSensorHandle} - " +
|
|
|
|
$"IsAtRest: {IsAtRest}");
|
2018-09-21 02:08:35 +02:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
// ActivateGesture(nn::applet::AppletResourceUserId, int Unknown0)
|
2018-12-05 01:52:39 +01:00
|
|
|
public long ActivateGesture(ServiceCtx Context)
|
2018-09-21 02:08:35 +02:00
|
|
|
{
|
2018-12-05 01:52:39 +01:00
|
|
|
long AppletResourceUserId = Context.RequestData.ReadInt64();
|
|
|
|
int Unknown0 = Context.RequestData.ReadInt32();
|
2018-09-21 02:08:35 +02:00
|
|
|
|
2018-12-05 01:52:39 +01:00
|
|
|
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. AppletResourceUserId: {AppletResourceUserId} - " +
|
|
|
|
$"Unknown0: {Unknown0}");
|
2018-09-21 02:08:35 +02:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// SetSupportedNpadStyleSet(nn::applet::AppletResourceUserId, nn::hid::NpadStyleTag)
|
2018-12-05 01:52:39 +01:00
|
|
|
public long SetSupportedNpadStyleSet(ServiceCtx Context)
|
2018-03-13 22:59:17 +01:00
|
|
|
{
|
2018-12-05 01:52:39 +01:00
|
|
|
NpadStyleSet = (HidNpadStyle)Context.RequestData.ReadInt32();
|
2018-04-24 20:57:39 +02:00
|
|
|
|
2018-12-05 01:52:39 +01:00
|
|
|
long AppletResourceUserId = Context.RequestData.ReadInt64();
|
2018-03-13 22:59:17 +01:00
|
|
|
|
2018-12-05 01:52:39 +01:00
|
|
|
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. AppletResourceUserId: {AppletResourceUserId} - " +
|
|
|
|
$"NpadStyleSet: {NpadStyleSet}");
|
2018-11-20 01:01:36 +01:00
|
|
|
|
2018-12-05 01:52:39 +01:00
|
|
|
NpadStyleSetUpdateEvent.ReadableEvent.Signal();
|
2018-04-17 02:24:42 +02:00
|
|
|
|
2018-03-13 22:59:17 +01:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2018-09-21 02:08:35 +02:00
|
|
|
// GetSupportedNpadStyleSet(nn::applet::AppletResourceUserId) -> uint nn::hid::NpadStyleTag
|
2018-12-05 01:52:39 +01:00
|
|
|
public long GetSupportedNpadStyleSet(ServiceCtx Context)
|
2018-03-13 22:59:17 +01:00
|
|
|
{
|
2018-12-05 01:52:39 +01:00
|
|
|
long AppletResourceUserId = Context.RequestData.ReadInt64();
|
2018-04-17 18:40:22 +02:00
|
|
|
|
2018-12-05 01:52:39 +01:00
|
|
|
Context.ResponseData.Write((int)NpadStyleSet);
|
2018-09-21 02:08:35 +02:00
|
|
|
|
2018-12-05 01:52:39 +01:00
|
|
|
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. AppletResourceUserId: {AppletResourceUserId} - " +
|
|
|
|
$"NpadStyleSet: {NpadStyleSet}");
|
2018-04-17 18:40:22 +02:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2018-09-21 02:08:35 +02:00
|
|
|
// SetSupportedNpadIdType(nn::applet::AppletResourceUserId, array<NpadIdType, 9>)
|
2018-12-05 01:52:39 +01:00
|
|
|
public long SetSupportedNpadIdType(ServiceCtx Context)
|
2018-04-17 18:40:22 +02:00
|
|
|
{
|
2018-12-05 01:52:39 +01:00
|
|
|
long AppletResourceUserId = Context.RequestData.ReadInt64();
|
|
|
|
HidControllerId NpadIdType = (HidControllerId)Context.RequestData.ReadInt64();
|
2018-03-13 22:59:17 +01:00
|
|
|
|
2018-12-05 01:52:39 +01:00
|
|
|
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. AppletResourceUserId: {AppletResourceUserId} - " +
|
|
|
|
$"NpadIdType: {NpadIdType}");
|
2018-04-17 02:24:42 +02:00
|
|
|
|
2018-03-13 22:59:17 +01:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2018-09-21 02:08:35 +02:00
|
|
|
// ActivateNpad(nn::applet::AppletResourceUserId)
|
2018-12-05 01:52:39 +01:00
|
|
|
public long ActivateNpad(ServiceCtx Context)
|
2018-02-25 19:58:16 +01:00
|
|
|
{
|
2018-12-05 01:52:39 +01:00
|
|
|
long AppletResourceUserId = Context.RequestData.ReadInt64();
|
2018-09-21 02:08:35 +02:00
|
|
|
|
2018-12-05 01:52:39 +01:00
|
|
|
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. AppletResourceUserId: {AppletResourceUserId}");
|
2018-09-21 02:08:35 +02:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
2018-02-25 19:58:16 +01:00
|
|
|
|
2018-09-21 02:08:35 +02:00
|
|
|
// DeactivateNpad(nn::applet::AppletResourceUserId)
|
2018-12-05 01:52:39 +01:00
|
|
|
public long DeactivateNpad(ServiceCtx Context)
|
2018-09-21 02:08:35 +02:00
|
|
|
{
|
2018-12-05 01:52:39 +01:00
|
|
|
long AppletResourceUserId = Context.RequestData.ReadInt64();
|
2018-04-17 02:24:42 +02:00
|
|
|
|
2018-12-05 01:52:39 +01:00
|
|
|
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. AppletResourceUserId: {AppletResourceUserId}");
|
2018-02-25 19:58:16 +01:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2018-09-21 02:08:35 +02:00
|
|
|
// AcquireNpadStyleSetUpdateEventHandle(nn::applet::AppletResourceUserId, uint, ulong) -> nn::sf::NativeHandle
|
2018-12-05 01:52:39 +01:00
|
|
|
public long AcquireNpadStyleSetUpdateEventHandle(ServiceCtx Context)
|
2018-04-17 18:40:22 +02:00
|
|
|
{
|
2018-12-05 01:52:39 +01:00
|
|
|
long AppletResourceUserId = Context.RequestData.ReadInt64();
|
|
|
|
int NpadId = Context.RequestData.ReadInt32();
|
|
|
|
long NpadStyleSet = Context.RequestData.ReadInt64();
|
2018-09-21 02:08:35 +02:00
|
|
|
|
2018-12-05 01:52:39 +01:00
|
|
|
if (Context.Process.HandleTable.GenerateHandle(NpadStyleSetUpdateEvent.ReadableEvent, out int Handle) != KernelResult.Success)
|
2018-09-23 20:11:46 +02:00
|
|
|
{
|
|
|
|
throw new InvalidOperationException("Out of handles!");
|
|
|
|
}
|
2018-09-21 02:08:35 +02:00
|
|
|
|
2018-12-05 01:52:39 +01:00
|
|
|
Context.Response.HandleDesc = IpcHandleDesc.MakeCopy(Handle);
|
2018-09-21 02:08:35 +02:00
|
|
|
|
2018-12-05 01:52:39 +01:00
|
|
|
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. AppletResourceUserId: {AppletResourceUserId} - " +
|
|
|
|
$"NpadId: {NpadId} - " +
|
|
|
|
$"NpadStyleSet: {NpadStyleSet}");
|
2018-04-17 18:40:22 +02:00
|
|
|
|
2018-09-21 02:08:35 +02:00
|
|
|
return 0;
|
|
|
|
}
|
2018-04-17 18:40:22 +02:00
|
|
|
|
2018-09-21 02:08:35 +02:00
|
|
|
// DisconnectNpad(nn::applet::AppletResourceUserId, uint NpadIdType)
|
2018-12-05 01:52:39 +01:00
|
|
|
public long DisconnectNpad(ServiceCtx Context)
|
2018-09-21 02:08:35 +02:00
|
|
|
{
|
2018-12-05 01:52:39 +01:00
|
|
|
long AppletResourceUserId = Context.RequestData.ReadInt64();
|
|
|
|
int NpadIdType = Context.RequestData.ReadInt32();
|
2018-04-17 18:40:22 +02:00
|
|
|
|
2018-12-05 01:52:39 +01:00
|
|
|
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. AppletResourceUserId: {AppletResourceUserId} - " +
|
|
|
|
$"NpadIdType: {NpadIdType}");
|
2018-04-17 18:40:22 +02:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2018-09-21 02:08:35 +02:00
|
|
|
// GetPlayerLedPattern(uint NpadId) -> ulong LedPattern
|
2018-12-05 01:52:39 +01:00
|
|
|
public long GetPlayerLedPattern(ServiceCtx Context)
|
2018-02-25 05:34:16 +01:00
|
|
|
{
|
2018-12-05 01:52:39 +01:00
|
|
|
int NpadId = Context.RequestData.ReadInt32();
|
2018-09-21 02:08:35 +02:00
|
|
|
|
2018-12-05 01:52:39 +01:00
|
|
|
long LedPattern = 0;
|
2018-09-21 02:08:35 +02:00
|
|
|
|
2018-12-05 01:52:39 +01:00
|
|
|
Context.ResponseData.Write(LedPattern);
|
2018-09-21 02:08:35 +02:00
|
|
|
|
2018-12-05 01:52:39 +01:00
|
|
|
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. NpadId: {NpadId} - Pattern: {LedPattern}");
|
2018-02-25 05:34:16 +01:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
2018-03-04 04:06:44 +01:00
|
|
|
|
2018-09-21 02:08:35 +02:00
|
|
|
// ActivateNpadWithRevision(nn::applet::AppletResourceUserId, int Unknown)
|
2018-12-05 01:52:39 +01:00
|
|
|
public long ActivateNpadWithRevision(ServiceCtx Context)
|
2018-09-21 02:08:35 +02:00
|
|
|
{
|
2018-12-05 01:52:39 +01:00
|
|
|
long AppletResourceUserId = Context.RequestData.ReadInt64();
|
|
|
|
int Unknown = Context.RequestData.ReadInt32();
|
2018-09-21 02:08:35 +02:00
|
|
|
|
2018-12-05 01:52:39 +01:00
|
|
|
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. AppletResourceUserId: {AppletResourceUserId} - Unknown: {Unknown}");
|
2018-09-21 02:08:35 +02:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
// SetNpadJoyHoldType(nn::applet::AppletResourceUserId, long NpadJoyHoldType)
|
2018-12-05 01:52:39 +01:00
|
|
|
public long SetNpadJoyHoldType(ServiceCtx Context)
|
2018-09-21 02:08:35 +02:00
|
|
|
{
|
2018-12-05 01:52:39 +01:00
|
|
|
long AppletResourceUserId = Context.RequestData.ReadInt64();
|
|
|
|
NpadJoyHoldType = (HidNpadJoyHoldType)Context.RequestData.ReadInt64();
|
2018-09-21 02:08:35 +02:00
|
|
|
|
2018-12-05 01:52:39 +01:00
|
|
|
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. AppletResourceUserId: {AppletResourceUserId} - " +
|
|
|
|
$"NpadJoyHoldType: {NpadJoyHoldType}");
|
2018-09-21 02:08:35 +02:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
// GetNpadJoyHoldType(nn::applet::AppletResourceUserId) -> long NpadJoyHoldType
|
2018-12-05 01:52:39 +01:00
|
|
|
public long GetNpadJoyHoldType(ServiceCtx Context)
|
2018-03-04 04:06:44 +01:00
|
|
|
{
|
2018-12-05 01:52:39 +01:00
|
|
|
long AppletResourceUserId = Context.RequestData.ReadInt64();
|
2018-09-21 02:08:35 +02:00
|
|
|
|
2018-12-05 01:52:39 +01:00
|
|
|
Context.ResponseData.Write((long)NpadJoyHoldType);
|
2018-09-21 02:08:35 +02:00
|
|
|
|
2018-12-05 01:52:39 +01:00
|
|
|
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. AppletResourceUserId: {AppletResourceUserId} - " +
|
|
|
|
$"NpadJoyHoldTypeValue: {NpadJoyHoldType}");
|
2018-09-21 02:08:35 +02:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
// SetNpadJoyAssignmentModeSingleByDefault(uint HidControllerId, nn::applet::AppletResourceUserId)
|
2018-12-05 01:52:39 +01:00
|
|
|
public long SetNpadJoyAssignmentModeSingleByDefault(ServiceCtx Context)
|
2018-09-21 02:08:35 +02:00
|
|
|
{
|
2018-12-05 01:52:39 +01:00
|
|
|
HidControllerId HidControllerId = (HidControllerId)Context.RequestData.ReadInt32();
|
|
|
|
long AppletResourceUserId = Context.RequestData.ReadInt64();
|
2018-09-21 02:08:35 +02:00
|
|
|
|
2018-12-05 01:52:39 +01:00
|
|
|
NpadJoyAssignmentMode = HidNpadJoyAssignmentMode.Single;
|
2018-09-21 02:08:35 +02:00
|
|
|
|
2018-12-05 01:52:39 +01:00
|
|
|
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. AppletResourceUserId: {AppletResourceUserId} - " +
|
|
|
|
$"HidControllerId: {HidControllerId} - " +
|
|
|
|
$"NpadJoyAssignmentModeValue: {NpadJoyAssignmentMode}");
|
2018-09-21 02:08:35 +02:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
// SetNpadJoyAssignmentModeSingle(uint HidControllerId, nn::applet::AppletResourceUserId, long HidNpadJoyDeviceType)
|
2018-12-05 01:52:39 +01:00
|
|
|
public long SetNpadJoyAssignmentModeSingle(ServiceCtx Context)
|
2018-09-21 02:08:35 +02:00
|
|
|
{
|
2018-12-05 01:52:39 +01:00
|
|
|
HidControllerId HidControllerId = (HidControllerId)Context.RequestData.ReadInt32();
|
|
|
|
long AppletResourceUserId = Context.RequestData.ReadInt64();
|
|
|
|
HidNpadJoyDeviceType HidNpadJoyDeviceType = (HidNpadJoyDeviceType)Context.RequestData.ReadInt64();
|
2018-09-21 02:08:35 +02:00
|
|
|
|
2018-12-05 01:52:39 +01:00
|
|
|
NpadJoyAssignmentMode = HidNpadJoyAssignmentMode.Single;
|
2018-09-21 02:08:35 +02:00
|
|
|
|
2018-12-05 01:52:39 +01:00
|
|
|
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. AppletResourceUserId: {AppletResourceUserId} - " +
|
|
|
|
$"HidControllerId: {HidControllerId} - " +
|
|
|
|
$"HidNpadJoyDeviceType: {HidNpadJoyDeviceType} - " +
|
|
|
|
$"NpadJoyAssignmentModeValue: {NpadJoyAssignmentMode}");
|
2018-09-21 02:08:35 +02:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
// SetNpadJoyAssignmentModeDual(uint HidControllerId, nn::applet::AppletResourceUserId)
|
2018-12-05 01:52:39 +01:00
|
|
|
public long SetNpadJoyAssignmentModeDual(ServiceCtx Context)
|
2018-09-21 02:08:35 +02:00
|
|
|
{
|
2018-12-05 01:52:39 +01:00
|
|
|
HidControllerId HidControllerId = (HidControllerId)Context.RequestData.ReadInt32();
|
|
|
|
long AppletResourceUserId = Context.RequestData.ReadInt64();
|
2018-09-21 02:08:35 +02:00
|
|
|
|
2018-12-05 01:52:39 +01:00
|
|
|
NpadJoyAssignmentMode = HidNpadJoyAssignmentMode.Dual;
|
2018-09-21 02:08:35 +02:00
|
|
|
|
2018-12-05 01:52:39 +01:00
|
|
|
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. AppletResourceUserId: {AppletResourceUserId} - " +
|
|
|
|
$"HidControllerId: {HidControllerId} - " +
|
|
|
|
$"NpadJoyAssignmentModeValue: {NpadJoyAssignmentMode}");
|
2018-09-21 02:08:35 +02:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
// MergeSingleJoyAsDualJoy(uint SingleJoyId0, uint SingleJoyId1, nn::applet::AppletResourceUserId)
|
2018-12-05 01:52:39 +01:00
|
|
|
public long MergeSingleJoyAsDualJoy(ServiceCtx Context)
|
2018-09-21 02:08:35 +02:00
|
|
|
{
|
2018-12-05 01:52:39 +01:00
|
|
|
long SingleJoyId0 = Context.RequestData.ReadInt32();
|
|
|
|
long SingleJoyId1 = Context.RequestData.ReadInt32();
|
|
|
|
long AppletResourceUserId = Context.RequestData.ReadInt64();
|
2018-09-21 02:08:35 +02:00
|
|
|
|
2018-12-05 01:52:39 +01:00
|
|
|
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. AppletResourceUserId: {AppletResourceUserId} - " +
|
|
|
|
$"SingleJoyId0: {SingleJoyId0} - " +
|
|
|
|
$"SingleJoyId1: {SingleJoyId1}");
|
2018-09-21 02:08:35 +02:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
// StartLrAssignmentMode(nn::applet::AppletResourceUserId)
|
2018-12-05 01:52:39 +01:00
|
|
|
public long StartLrAssignmentMode(ServiceCtx Context)
|
2018-09-21 02:08:35 +02:00
|
|
|
{
|
2018-12-05 01:52:39 +01:00
|
|
|
long AppletResourceUserId = Context.RequestData.ReadInt64();
|
2018-09-21 02:08:35 +02:00
|
|
|
|
2018-12-05 01:52:39 +01:00
|
|
|
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. AppletResourceUserId: {AppletResourceUserId}");
|
2018-09-21 02:08:35 +02:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
// StopLrAssignmentMode(nn::applet::AppletResourceUserId)
|
2018-12-05 01:52:39 +01:00
|
|
|
public long StopLrAssignmentMode(ServiceCtx Context)
|
2018-09-21 02:08:35 +02:00
|
|
|
{
|
2018-12-05 01:52:39 +01:00
|
|
|
long AppletResourceUserId = Context.RequestData.ReadInt64();
|
2018-09-21 02:08:35 +02:00
|
|
|
|
2018-12-05 01:52:39 +01:00
|
|
|
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. AppletResourceUserId: {AppletResourceUserId}");
|
2018-09-21 02:08:35 +02:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
// SetNpadHandheldActivationMode(nn::applet::AppletResourceUserId, long HidNpadHandheldActivationMode)
|
2018-12-05 01:52:39 +01:00
|
|
|
public long SetNpadHandheldActivationMode(ServiceCtx Context)
|
2018-09-21 02:08:35 +02:00
|
|
|
{
|
2018-12-05 01:52:39 +01:00
|
|
|
long AppletResourceUserId = Context.RequestData.ReadInt64();
|
|
|
|
NpadHandheldActivationMode = (HidNpadHandheldActivationMode)Context.RequestData.ReadInt64();
|
2018-09-21 02:08:35 +02:00
|
|
|
|
2018-12-05 01:52:39 +01:00
|
|
|
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. AppletResourceUserId: {AppletResourceUserId} - " +
|
|
|
|
$"NpadHandheldActivationMode: {NpadHandheldActivationMode}");
|
2018-09-21 02:08:35 +02:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
// GetNpadHandheldActivationMode(nn::applet::AppletResourceUserId) -> long HidNpadHandheldActivationMode
|
2018-12-05 01:52:39 +01:00
|
|
|
public long GetNpadHandheldActivationMode(ServiceCtx Context)
|
2018-09-21 02:08:35 +02:00
|
|
|
{
|
2018-12-05 01:52:39 +01:00
|
|
|
long AppletResourceUserId = Context.RequestData.ReadInt64();
|
2018-09-21 02:08:35 +02:00
|
|
|
|
2018-12-05 01:52:39 +01:00
|
|
|
Context.ResponseData.Write((long)NpadHandheldActivationMode);
|
2018-09-21 02:08:35 +02:00
|
|
|
|
2018-12-05 01:52:39 +01:00
|
|
|
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. AppletResourceUserId: {AppletResourceUserId} - " +
|
|
|
|
$"NpadHandheldActivationMode: {NpadHandheldActivationMode}");
|
2018-09-21 02:08:35 +02:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
// SwapNpadAssignment(uint OldNpadAssignment, uint NewNpadAssignment, nn::applet::AppletResourceUserId)
|
2018-12-05 01:52:39 +01:00
|
|
|
public long SwapNpadAssignment(ServiceCtx Context)
|
2018-09-21 02:08:35 +02:00
|
|
|
{
|
2018-12-05 01:52:39 +01:00
|
|
|
int OldNpadAssignment = Context.RequestData.ReadInt32();
|
|
|
|
int NewNpadAssignment = Context.RequestData.ReadInt32();
|
|
|
|
long AppletResourceUserId = Context.RequestData.ReadInt64();
|
2018-09-21 02:08:35 +02:00
|
|
|
|
2018-12-05 01:52:39 +01:00
|
|
|
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. AppletResourceUserId: {AppletResourceUserId} - " +
|
|
|
|
$"OldNpadAssignment: {OldNpadAssignment} - " +
|
|
|
|
$"NewNpadAssignment: {NewNpadAssignment}");
|
2018-09-21 02:08:35 +02:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
// IsUnintendedHomeButtonInputProtectionEnabled(uint Unknown0, nn::applet::AppletResourceUserId) -> bool IsEnabled
|
2018-12-05 01:52:39 +01:00
|
|
|
public long IsUnintendedHomeButtonInputProtectionEnabled(ServiceCtx Context)
|
2018-09-21 02:08:35 +02:00
|
|
|
{
|
2018-12-05 01:52:39 +01:00
|
|
|
uint Unknown0 = Context.RequestData.ReadUInt32();
|
|
|
|
long AppletResourceUserId = Context.RequestData.ReadInt64();
|
2018-09-21 02:08:35 +02:00
|
|
|
|
2018-12-05 01:52:39 +01:00
|
|
|
Context.ResponseData.Write(UnintendedHomeButtonInputProtectionEnabled);
|
2018-09-21 02:08:35 +02:00
|
|
|
|
2018-12-05 01:52:39 +01:00
|
|
|
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. AppletResourceUserId: {AppletResourceUserId} - " +
|
|
|
|
$"Unknown0: {Unknown0} - " +
|
|
|
|
$"UnintendedHomeButtonInputProtectionEnabled: {UnintendedHomeButtonInputProtectionEnabled}");
|
2018-09-21 02:08:35 +02:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
// EnableUnintendedHomeButtonInputProtection(bool Enable, uint Unknown0, nn::applet::AppletResourceUserId)
|
2018-12-05 01:52:39 +01:00
|
|
|
public long EnableUnintendedHomeButtonInputProtection(ServiceCtx Context)
|
2018-09-21 02:08:35 +02:00
|
|
|
{
|
2018-12-05 01:52:39 +01:00
|
|
|
UnintendedHomeButtonInputProtectionEnabled = Context.RequestData.ReadBoolean();
|
|
|
|
uint Unknown0 = Context.RequestData.ReadUInt32();
|
|
|
|
long AppletResourceUserId = Context.RequestData.ReadInt64();
|
2018-09-21 02:08:35 +02:00
|
|
|
|
2018-12-05 01:52:39 +01:00
|
|
|
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. AppletResourceUserId: {AppletResourceUserId} - " +
|
|
|
|
$"Unknown0: {Unknown0} - " +
|
|
|
|
$"UnintendedHomeButtonInputProtectionEnable: {UnintendedHomeButtonInputProtectionEnabled}");
|
2018-09-21 02:08:35 +02:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
// SetNpadJoyAssignmentModeSingleWithDestination(uint HidControllerId, long HidNpadJoyDeviceType, nn::applet::AppletResourceUserId) -> bool Unknown0, uint Unknown1
|
2018-12-05 01:52:39 +01:00
|
|
|
public long SetNpadJoyAssignmentModeSingleWithDestination(ServiceCtx Context)
|
2018-09-21 02:08:35 +02:00
|
|
|
{
|
2018-12-05 01:52:39 +01:00
|
|
|
HidControllerId HidControllerId = (HidControllerId)Context.RequestData.ReadInt32();
|
|
|
|
HidNpadJoyDeviceType HidNpadJoyDeviceType = (HidNpadJoyDeviceType)Context.RequestData.ReadInt64();
|
|
|
|
long AppletResourceUserId = Context.RequestData.ReadInt64();
|
2018-09-21 02:08:35 +02:00
|
|
|
|
2018-12-05 01:52:39 +01:00
|
|
|
NpadJoyAssignmentMode = HidNpadJoyAssignmentMode.Single;
|
2018-09-21 02:08:35 +02:00
|
|
|
|
2018-12-05 01:52:39 +01:00
|
|
|
Context.ResponseData.Write(0); //Unknown0
|
|
|
|
Context.ResponseData.Write(0); //Unknown1
|
2018-09-21 02:08:35 +02:00
|
|
|
|
2018-12-05 01:52:39 +01:00
|
|
|
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. AppletResourceUserId: {AppletResourceUserId} - " +
|
|
|
|
$"HidControllerId: {HidControllerId} - " +
|
|
|
|
$"HidNpadJoyDeviceType: {HidNpadJoyDeviceType} - " +
|
|
|
|
$"NpadJoyAssignmentModeValue: {NpadJoyAssignmentMode} - " +
|
2018-10-17 19:15:50 +02:00
|
|
|
$"Unknown0: 0 - " +
|
|
|
|
$"Unknown1: 0");
|
2018-09-21 02:08:35 +02:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
// GetVibrationDeviceInfo(nn::hid::VibrationDeviceHandle) -> nn::hid::VibrationDeviceInfo
|
2018-12-05 01:52:39 +01:00
|
|
|
public long GetVibrationDeviceInfo(ServiceCtx Context)
|
2018-09-21 02:08:35 +02:00
|
|
|
{
|
2018-12-05 01:52:39 +01:00
|
|
|
int VibrationDeviceHandle = Context.RequestData.ReadInt32();
|
2018-09-21 02:08:35 +02:00
|
|
|
|
2018-12-05 01:52:39 +01:00
|
|
|
HidVibrationDeviceValue DeviceInfo = new HidVibrationDeviceValue
|
2018-09-21 02:08:35 +02:00
|
|
|
{
|
|
|
|
DeviceType = HidVibrationDeviceType.None,
|
|
|
|
Position = HidVibrationDevicePosition.None
|
|
|
|
};
|
|
|
|
|
2018-12-05 01:52:39 +01:00
|
|
|
Context.ResponseData.Write((int)DeviceInfo.DeviceType);
|
|
|
|
Context.ResponseData.Write((int)DeviceInfo.Position);
|
2018-09-21 02:08:35 +02:00
|
|
|
|
2018-12-05 01:52:39 +01:00
|
|
|
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. VibrationDeviceHandle: {VibrationDeviceHandle} - " +
|
|
|
|
$"DeviceType: {DeviceInfo.DeviceType} - " +
|
|
|
|
$"Position: {DeviceInfo.Position}");
|
2018-09-21 02:08:35 +02:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
// SendVibrationValue(nn::hid::VibrationDeviceHandle, nn::hid::VibrationValue, nn::applet::AppletResourceUserId)
|
2018-12-05 01:52:39 +01:00
|
|
|
public long SendVibrationValue(ServiceCtx Context)
|
2018-09-21 02:08:35 +02:00
|
|
|
{
|
2018-12-05 01:52:39 +01:00
|
|
|
int VibrationDeviceHandle = Context.RequestData.ReadInt32();
|
2018-09-21 02:08:35 +02:00
|
|
|
|
2018-12-05 01:52:39 +01:00
|
|
|
VibrationValue = new HidVibrationValue
|
2018-09-21 02:08:35 +02:00
|
|
|
{
|
2018-12-05 01:52:39 +01:00
|
|
|
AmplitudeLow = Context.RequestData.ReadSingle(),
|
|
|
|
FrequencyLow = Context.RequestData.ReadSingle(),
|
|
|
|
AmplitudeHigh = Context.RequestData.ReadSingle(),
|
|
|
|
FrequencyHigh = Context.RequestData.ReadSingle()
|
2018-09-21 02:08:35 +02:00
|
|
|
};
|
|
|
|
|
2018-12-05 01:52:39 +01:00
|
|
|
long AppletResourceUserId = Context.RequestData.ReadInt64();
|
2018-09-21 02:08:35 +02:00
|
|
|
|
2018-12-05 01:52:39 +01:00
|
|
|
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. AppletResourceUserId: {AppletResourceUserId} - " +
|
|
|
|
$"VibrationDeviceHandle: {VibrationDeviceHandle} - " +
|
|
|
|
$"AmplitudeLow: {VibrationValue.AmplitudeLow} - " +
|
|
|
|
$"FrequencyLow: {VibrationValue.FrequencyLow} - " +
|
|
|
|
$"AmplitudeHigh: {VibrationValue.AmplitudeHigh} - " +
|
|
|
|
$"FrequencyHigh: {VibrationValue.FrequencyHigh}");
|
2018-09-21 02:08:35 +02:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
// GetActualVibrationValue(nn::hid::VibrationDeviceHandle, nn::applet::AppletResourceUserId) -> nn::hid::VibrationValue
|
2018-12-05 01:52:39 +01:00
|
|
|
public long GetActualVibrationValue(ServiceCtx Context)
|
2018-09-21 02:08:35 +02:00
|
|
|
{
|
2018-12-05 01:52:39 +01:00
|
|
|
int VibrationDeviceHandle = Context.RequestData.ReadInt32();
|
|
|
|
long AppletResourceUserId = Context.RequestData.ReadInt64();
|
2018-09-21 02:08:35 +02:00
|
|
|
|
2018-12-05 01:52:39 +01:00
|
|
|
Context.ResponseData.Write(VibrationValue.AmplitudeLow);
|
|
|
|
Context.ResponseData.Write(VibrationValue.FrequencyLow);
|
|
|
|
Context.ResponseData.Write(VibrationValue.AmplitudeHigh);
|
|
|
|
Context.ResponseData.Write(VibrationValue.FrequencyHigh);
|
2018-09-21 02:08:35 +02:00
|
|
|
|
2018-12-05 01:52:39 +01:00
|
|
|
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. AppletResourceUserId: {AppletResourceUserId} - " +
|
|
|
|
$"VibrationDeviceHandle: {VibrationDeviceHandle} - " +
|
|
|
|
$"AmplitudeLow: {VibrationValue.AmplitudeLow} - " +
|
|
|
|
$"FrequencyLow: {VibrationValue.FrequencyLow} - " +
|
|
|
|
$"AmplitudeHigh: {VibrationValue.AmplitudeHigh} - " +
|
|
|
|
$"FrequencyHigh: {VibrationValue.FrequencyHigh}");
|
2018-09-21 02:08:35 +02:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
// CreateActiveVibrationDeviceList() -> object<nn::hid::IActiveVibrationDeviceList>
|
2018-12-05 01:52:39 +01:00
|
|
|
public long CreateActiveVibrationDeviceList(ServiceCtx Context)
|
2018-09-21 02:08:35 +02:00
|
|
|
{
|
2018-12-05 01:52:39 +01:00
|
|
|
MakeObject(Context, new IActiveApplicationDeviceList());
|
2018-09-21 02:08:35 +02:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
// PermitVibration(bool Enable)
|
2018-12-05 01:52:39 +01:00
|
|
|
public long PermitVibration(ServiceCtx Context)
|
2018-09-21 02:08:35 +02:00
|
|
|
{
|
2018-12-05 01:52:39 +01:00
|
|
|
VibrationPermitted = Context.RequestData.ReadBoolean();
|
2018-09-21 02:08:35 +02:00
|
|
|
|
2018-12-05 01:52:39 +01:00
|
|
|
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. VibrationPermitted: {VibrationPermitted}");
|
2018-09-21 02:08:35 +02:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
// IsVibrationPermitted() -> bool IsEnabled
|
2018-12-05 01:52:39 +01:00
|
|
|
public long IsVibrationPermitted(ServiceCtx Context)
|
2018-09-21 02:08:35 +02:00
|
|
|
{
|
2018-12-05 01:52:39 +01:00
|
|
|
Context.ResponseData.Write(VibrationPermitted);
|
2018-09-21 02:08:35 +02:00
|
|
|
|
2018-12-05 01:52:39 +01:00
|
|
|
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. VibrationPermitted: {VibrationPermitted}");
|
2018-09-21 02:08:35 +02:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
// SendVibrationValues(nn::applet::AppletResourceUserId, buffer<array<nn::hid::VibrationDeviceHandle>, type: 9>, buffer<array<nn::hid::VibrationValue>, type: 9>)
|
2018-12-05 01:52:39 +01:00
|
|
|
public long SendVibrationValues(ServiceCtx Context)
|
2018-09-21 02:08:35 +02:00
|
|
|
{
|
2018-12-05 01:52:39 +01:00
|
|
|
long AppletResourceUserId = Context.RequestData.ReadInt64();
|
2018-09-21 02:08:35 +02:00
|
|
|
|
2018-12-05 01:52:39 +01:00
|
|
|
byte[] VibrationDeviceHandleBuffer = Context.Memory.ReadBytes(
|
|
|
|
Context.Request.PtrBuff[0].Position,
|
|
|
|
Context.Request.PtrBuff[0].Size);
|
2018-09-21 02:08:35 +02:00
|
|
|
|
2018-12-05 01:52:39 +01:00
|
|
|
byte[] VibrationValueBuffer = Context.Memory.ReadBytes(
|
|
|
|
Context.Request.PtrBuff[1].Position,
|
|
|
|
Context.Request.PtrBuff[1].Size);
|
2018-09-21 02:08:35 +02:00
|
|
|
|
|
|
|
//Todo: Read all handles and values from buffer.
|
|
|
|
|
2018-12-05 01:52:39 +01:00
|
|
|
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. AppletResourceUserId: {AppletResourceUserId} - " +
|
|
|
|
$"VibrationDeviceHandleBufferLength: {VibrationDeviceHandleBuffer.Length} - " +
|
|
|
|
$"VibrationValueBufferLength: {VibrationValueBuffer.Length}");
|
2018-09-21 02:08:35 +02:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
// SendVibrationGcErmCommand(nn::hid::VibrationDeviceHandle, nn::hid::VibrationGcErmCommand, nn::applet::AppletResourceUserId)
|
2018-12-05 01:52:39 +01:00
|
|
|
public long SendVibrationGcErmCommand(ServiceCtx Context)
|
2018-09-21 02:08:35 +02:00
|
|
|
{
|
2018-12-05 01:52:39 +01:00
|
|
|
int VibrationDeviceHandle = Context.RequestData.ReadInt32();
|
|
|
|
long VibrationGcErmCommand = Context.RequestData.ReadInt64();
|
|
|
|
long AppletResourceUserId = Context.RequestData.ReadInt64();
|
2018-09-21 02:08:35 +02:00
|
|
|
|
2018-12-05 01:52:39 +01:00
|
|
|
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. AppletResourceUserId: {AppletResourceUserId} - " +
|
|
|
|
$"VibrationDeviceHandle: {VibrationDeviceHandle} - " +
|
|
|
|
$"VibrationGcErmCommand: {VibrationGcErmCommand}");
|
2018-09-21 02:08:35 +02:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
// GetActualVibrationGcErmCommand(nn::hid::VibrationDeviceHandle, nn::applet::AppletResourceUserId) -> nn::hid::VibrationGcErmCommand
|
2018-12-05 01:52:39 +01:00
|
|
|
public long GetActualVibrationGcErmCommand(ServiceCtx Context)
|
2018-09-21 02:08:35 +02:00
|
|
|
{
|
2018-12-05 01:52:39 +01:00
|
|
|
int VibrationDeviceHandle = Context.RequestData.ReadInt32();
|
|
|
|
long AppletResourceUserId = Context.RequestData.ReadInt64();
|
2018-09-21 02:08:35 +02:00
|
|
|
|
2018-12-05 01:52:39 +01:00
|
|
|
Context.ResponseData.Write(VibrationGcErmCommand);
|
2018-09-21 02:08:35 +02:00
|
|
|
|
2018-12-05 01:52:39 +01:00
|
|
|
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. AppletResourceUserId: {AppletResourceUserId} - " +
|
|
|
|
$"VibrationDeviceHandle: {VibrationDeviceHandle} - " +
|
|
|
|
$"VibrationGcErmCommand: {VibrationGcErmCommand}");
|
2018-09-21 02:08:35 +02:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
// BeginPermitVibrationSession(nn::applet::AppletResourceUserId)
|
2018-12-05 01:52:39 +01:00
|
|
|
public long BeginPermitVibrationSession(ServiceCtx Context)
|
2018-09-21 02:08:35 +02:00
|
|
|
{
|
2018-12-05 01:52:39 +01:00
|
|
|
long AppletResourceUserId = Context.RequestData.ReadInt64();
|
2018-09-21 02:08:35 +02:00
|
|
|
|
2018-12-05 01:52:39 +01:00
|
|
|
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. AppletResourceUserId: {AppletResourceUserId}");
|
2018-09-21 02:08:35 +02:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
// EndPermitVibrationSession()
|
2018-12-05 01:52:39 +01:00
|
|
|
public long EndPermitVibrationSession(ServiceCtx Context)
|
2018-09-21 02:08:35 +02:00
|
|
|
{
|
2018-10-17 19:15:50 +02:00
|
|
|
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed.");
|
2018-09-21 02:08:35 +02:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
// ActivateConsoleSixAxisSensor(nn::applet::AppletResourceUserId)
|
2018-12-05 01:52:39 +01:00
|
|
|
public long ActivateConsoleSixAxisSensor(ServiceCtx Context)
|
2018-09-21 02:08:35 +02:00
|
|
|
{
|
2018-12-05 01:52:39 +01:00
|
|
|
long AppletResourceUserId = Context.RequestData.ReadInt64();
|
2018-09-21 02:08:35 +02:00
|
|
|
|
2018-12-05 01:52:39 +01:00
|
|
|
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. AppletResourceUserId: {AppletResourceUserId}");
|
2018-09-21 02:08:35 +02:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
// StartConsoleSixAxisSensor(nn::hid::ConsoleSixAxisSensorHandle, nn::applet::AppletResourceUserId)
|
2018-12-05 01:52:39 +01:00
|
|
|
public long StartConsoleSixAxisSensor(ServiceCtx Context)
|
2018-09-21 02:08:35 +02:00
|
|
|
{
|
2018-12-05 01:52:39 +01:00
|
|
|
int ConsoleSixAxisSensorHandle = Context.RequestData.ReadInt32();
|
|
|
|
long AppletResourceUserId = Context.RequestData.ReadInt64();
|
2018-09-23 20:11:46 +02:00
|
|
|
|
2018-12-05 01:52:39 +01:00
|
|
|
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. AppletResourceUserId: {AppletResourceUserId} - " +
|
|
|
|
$"ConsoleSixAxisSensorHandle: {ConsoleSixAxisSensorHandle}");
|
2018-09-21 02:08:35 +02:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
// StopConsoleSixAxisSensor(nn::hid::ConsoleSixAxisSensorHandle, nn::applet::AppletResourceUserId)
|
2018-12-05 01:52:39 +01:00
|
|
|
public long StopConsoleSixAxisSensor(ServiceCtx Context)
|
2018-09-21 02:08:35 +02:00
|
|
|
{
|
2018-12-05 01:52:39 +01:00
|
|
|
int ConsoleSixAxisSensorHandle = Context.RequestData.ReadInt32();
|
|
|
|
long AppletResourceUserId = Context.RequestData.ReadInt64();
|
2018-09-21 02:08:35 +02:00
|
|
|
|
2018-12-05 01:52:39 +01:00
|
|
|
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. AppletResourceUserId: {AppletResourceUserId} - " +
|
|
|
|
$"ConsoleSixAxisSensorHandle: {ConsoleSixAxisSensorHandle}");
|
2018-09-21 02:08:35 +02:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
// ActivateSevenSixAxisSensor(nn::applet::AppletResourceUserId)
|
2018-12-05 01:52:39 +01:00
|
|
|
public long ActivateSevenSixAxisSensor(ServiceCtx Context)
|
2018-09-21 02:08:35 +02:00
|
|
|
{
|
2018-12-05 01:52:39 +01:00
|
|
|
long AppletResourceUserId = Context.RequestData.ReadInt64();
|
2018-09-21 02:08:35 +02:00
|
|
|
|
2018-12-05 01:52:39 +01:00
|
|
|
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. AppletResourceUserId: {AppletResourceUserId}");
|
2018-09-21 02:08:35 +02:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
// StartSevenSixAxisSensor(nn::applet::AppletResourceUserId)
|
2018-12-05 01:52:39 +01:00
|
|
|
public long StartSevenSixAxisSensor(ServiceCtx Context)
|
2018-09-21 02:08:35 +02:00
|
|
|
{
|
2018-12-05 01:52:39 +01:00
|
|
|
long AppletResourceUserId = Context.RequestData.ReadInt64();
|
2018-09-21 02:08:35 +02:00
|
|
|
|
2018-12-05 01:52:39 +01:00
|
|
|
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. AppletResourceUserId: {AppletResourceUserId}");
|
2018-09-21 02:08:35 +02:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
// StopSevenSixAxisSensor(nn::applet::AppletResourceUserId)
|
2018-12-05 01:52:39 +01:00
|
|
|
public long StopSevenSixAxisSensor(ServiceCtx Context)
|
2018-09-21 02:08:35 +02:00
|
|
|
{
|
2018-12-05 01:52:39 +01:00
|
|
|
long AppletResourceUserId = Context.RequestData.ReadInt64();
|
2018-09-21 02:08:35 +02:00
|
|
|
|
2018-12-05 01:52:39 +01:00
|
|
|
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. AppletResourceUserId: {AppletResourceUserId}");
|
2018-09-21 02:08:35 +02:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
// InitializeSevenSixAxisSensor(array<nn::sf::NativeHandle>, ulong Counter0, array<nn::sf::NativeHandle>, ulong Counter1, nn::applet::AppletResourceUserId)
|
2018-12-05 01:52:39 +01:00
|
|
|
public long InitializeSevenSixAxisSensor(ServiceCtx Context)
|
2018-09-21 02:08:35 +02:00
|
|
|
{
|
2018-12-05 01:52:39 +01:00
|
|
|
long AppletResourceUserId = Context.RequestData.ReadInt64();
|
|
|
|
long Counter0 = Context.RequestData.ReadInt64();
|
|
|
|
long Counter1 = Context.RequestData.ReadInt64();
|
2018-09-21 02:08:35 +02:00
|
|
|
|
|
|
|
// Todo: Determine if array<nn::sf::NativeHandle> is a buffer or not...
|
|
|
|
|
2018-12-05 01:52:39 +01:00
|
|
|
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. AppletResourceUserId: {AppletResourceUserId} - " +
|
|
|
|
$"Counter0: {Counter0} - " +
|
|
|
|
$"Counter1: {Counter1}");
|
2018-09-21 02:08:35 +02:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
// FinalizeSevenSixAxisSensor(nn::applet::AppletResourceUserId)
|
2018-12-05 01:52:39 +01:00
|
|
|
public long FinalizeSevenSixAxisSensor(ServiceCtx Context)
|
2018-09-21 02:08:35 +02:00
|
|
|
{
|
2018-12-05 01:52:39 +01:00
|
|
|
long AppletResourceUserId = Context.RequestData.ReadInt64();
|
|
|
|
|
|
|
|
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. AppletResourceUserId: {AppletResourceUserId}");
|
2018-09-21 02:08:35 +02:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
// SetSevenSixAxisSensorFusionStrength(float Strength, nn::applet::AppletResourceUserId)
|
2018-12-05 01:52:39 +01:00
|
|
|
public long SetSevenSixAxisSensorFusionStrength(ServiceCtx Context)
|
2018-09-21 02:08:35 +02:00
|
|
|
{
|
2018-12-05 01:52:39 +01:00
|
|
|
SevenSixAxisSensorFusionStrength = Context.RequestData.ReadSingle();
|
|
|
|
long AppletResourceUserId = Context.RequestData.ReadInt64();
|
2018-09-21 02:08:35 +02:00
|
|
|
|
2018-12-05 01:52:39 +01:00
|
|
|
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. AppletResourceUserId: {AppletResourceUserId} - " +
|
|
|
|
$"SevenSixAxisSensorFusionStrength: {SevenSixAxisSensorFusionStrength}");
|
2018-09-21 02:08:35 +02:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
// GetSevenSixAxisSensorFusionStrength(nn::applet::AppletResourceUserId) -> float Strength
|
2018-12-05 01:52:39 +01:00
|
|
|
public long GetSevenSixAxisSensorFusionStrength(ServiceCtx Context)
|
2018-09-21 02:08:35 +02:00
|
|
|
{
|
2018-12-05 01:52:39 +01:00
|
|
|
long AppletResourceUserId = Context.RequestData.ReadInt64();
|
2018-09-21 02:08:35 +02:00
|
|
|
|
2018-12-05 01:52:39 +01:00
|
|
|
Context.ResponseData.Write(SevenSixAxisSensorFusionStrength);
|
2018-09-21 02:08:35 +02:00
|
|
|
|
2018-12-05 01:52:39 +01:00
|
|
|
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. AppletResourceUserId: {AppletResourceUserId} - " +
|
|
|
|
$"SevenSixAxisSensorFusionStrength: {SevenSixAxisSensorFusionStrength}");
|
2018-09-21 02:08:35 +02:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
// IsUsbFullKeyControllerEnabled() -> bool IsEnabled
|
2018-12-05 01:52:39 +01:00
|
|
|
public long IsUsbFullKeyControllerEnabled(ServiceCtx Context)
|
2018-09-21 02:08:35 +02:00
|
|
|
{
|
2018-12-05 01:52:39 +01:00
|
|
|
Context.ResponseData.Write(UsbFullKeyControllerEnabled);
|
2018-09-21 02:08:35 +02:00
|
|
|
|
2018-12-05 01:52:39 +01:00
|
|
|
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. UsbFullKeyControllerEnabled: {UsbFullKeyControllerEnabled}");
|
2018-09-21 02:08:35 +02:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
// EnableUsbFullKeyController(bool Enable)
|
2018-12-05 01:52:39 +01:00
|
|
|
public long EnableUsbFullKeyController(ServiceCtx Context)
|
2018-09-21 02:08:35 +02:00
|
|
|
{
|
2018-12-05 01:52:39 +01:00
|
|
|
UsbFullKeyControllerEnabled = Context.RequestData.ReadBoolean();
|
2018-09-21 02:08:35 +02:00
|
|
|
|
2018-12-05 01:52:39 +01:00
|
|
|
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. UsbFullKeyControllerEnabled: {UsbFullKeyControllerEnabled}");
|
2018-09-21 02:08:35 +02:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
// IsUsbFullKeyControllerConnected(uint Unknown0) -> bool Connected
|
2018-12-05 01:52:39 +01:00
|
|
|
public long IsUsbFullKeyControllerConnected(ServiceCtx Context)
|
2018-09-21 02:08:35 +02:00
|
|
|
{
|
2018-12-05 01:52:39 +01:00
|
|
|
int Unknown0 = Context.RequestData.ReadInt32();
|
2018-09-21 02:08:35 +02:00
|
|
|
|
2018-12-05 01:52:39 +01:00
|
|
|
Context.ResponseData.Write(true); //FullKeyController is always connected ?
|
2018-09-21 02:08:35 +02:00
|
|
|
|
2018-12-05 01:52:39 +01:00
|
|
|
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. Unknown0: {Unknown0} - Connected: true");
|
2018-09-21 02:08:35 +02:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
// HasBattery(uint NpadId) -> bool HasBattery
|
2018-12-05 01:52:39 +01:00
|
|
|
public long HasBattery(ServiceCtx Context)
|
2018-09-21 02:08:35 +02:00
|
|
|
{
|
2018-12-05 01:52:39 +01:00
|
|
|
int NpadId = Context.RequestData.ReadInt32();
|
2018-09-21 02:08:35 +02:00
|
|
|
|
2018-12-05 01:52:39 +01:00
|
|
|
Context.ResponseData.Write(true); //Npad always got a battery ?
|
2018-09-21 02:08:35 +02:00
|
|
|
|
2018-12-05 01:52:39 +01:00
|
|
|
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. NpadId: {NpadId} - HasBattery: true");
|
2018-09-21 02:08:35 +02:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
// HasLeftRightBattery(uint NpadId) -> bool HasLeftBattery, bool HasRightBattery
|
2018-12-05 01:52:39 +01:00
|
|
|
public long HasLeftRightBattery(ServiceCtx Context)
|
2018-09-21 02:08:35 +02:00
|
|
|
{
|
2018-12-05 01:52:39 +01:00
|
|
|
int NpadId = Context.RequestData.ReadInt32();
|
2018-09-21 02:08:35 +02:00
|
|
|
|
2018-12-05 01:52:39 +01:00
|
|
|
Context.ResponseData.Write(true); //Npad always got a left battery ?
|
|
|
|
Context.ResponseData.Write(true); //Npad always got a right battery ?
|
2018-09-21 02:08:35 +02:00
|
|
|
|
2018-12-05 01:52:39 +01:00
|
|
|
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. NpadId: {NpadId} - HasLeftBattery: true - HasRightBattery: true");
|
2018-09-21 02:08:35 +02:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
// GetNpadInterfaceType(uint NpadId) -> uchar InterfaceType
|
2018-12-05 01:52:39 +01:00
|
|
|
public long GetNpadInterfaceType(ServiceCtx Context)
|
2018-09-21 02:08:35 +02:00
|
|
|
{
|
2018-12-05 01:52:39 +01:00
|
|
|
int NpadId = Context.RequestData.ReadInt32();
|
2018-09-21 02:08:35 +02:00
|
|
|
|
2018-12-05 01:52:39 +01:00
|
|
|
Context.ResponseData.Write((byte)0);
|
2018-09-21 02:08:35 +02:00
|
|
|
|
2018-12-05 01:52:39 +01:00
|
|
|
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. NpadId: {NpadId} - NpadInterfaceType: 0");
|
2018-09-21 02:08:35 +02:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
// GetNpadLeftRightInterfaceType(uint NpadId) -> uchar LeftInterfaceType, uchar RightInterfaceType
|
2018-12-05 01:52:39 +01:00
|
|
|
public long GetNpadLeftRightInterfaceType(ServiceCtx Context)
|
2018-09-21 02:08:35 +02:00
|
|
|
{
|
2018-12-05 01:52:39 +01:00
|
|
|
int NpadId = Context.RequestData.ReadInt32();
|
2018-09-21 02:08:35 +02:00
|
|
|
|
2018-12-05 01:52:39 +01:00
|
|
|
Context.ResponseData.Write((byte)0);
|
|
|
|
Context.ResponseData.Write((byte)0);
|
2018-09-21 02:08:35 +02:00
|
|
|
|
2018-12-05 01:52:39 +01:00
|
|
|
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. NpadId: {NpadId} - " +
|
2018-10-17 19:15:50 +02:00
|
|
|
$"LeftInterfaceType: 0 - " +
|
|
|
|
$"RightInterfaceType: 0");
|
2018-09-21 02:08:35 +02:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
// GetPalmaConnectionHandle(uint Unknown0, nn::applet::AppletResourceUserId) -> nn::hid::PalmaConnectionHandle
|
2018-12-05 01:52:39 +01:00
|
|
|
public long GetPalmaConnectionHandle(ServiceCtx Context)
|
2018-09-21 02:08:35 +02:00
|
|
|
{
|
2018-12-05 01:52:39 +01:00
|
|
|
int Unknown0 = Context.RequestData.ReadInt32();
|
|
|
|
long AppletResourceUserId = Context.RequestData.ReadInt64();
|
2018-09-21 02:08:35 +02:00
|
|
|
|
2018-12-05 01:52:39 +01:00
|
|
|
int PalmaConnectionHandle = 0;
|
2018-09-21 02:08:35 +02:00
|
|
|
|
2018-12-05 01:52:39 +01:00
|
|
|
Context.ResponseData.Write(PalmaConnectionHandle);
|
2018-09-21 02:08:35 +02:00
|
|
|
|
2018-12-05 01:52:39 +01:00
|
|
|
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. AppletResourceUserId: {AppletResourceUserId} - " +
|
|
|
|
$"Unknown0: {Unknown0} - " +
|
|
|
|
$"PalmaConnectionHandle: {PalmaConnectionHandle}");
|
2018-09-21 02:08:35 +02:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
// InitializePalma(nn::hid::PalmaConnectionHandle)
|
2018-12-05 01:52:39 +01:00
|
|
|
public long InitializePalma(ServiceCtx Context)
|
2018-09-21 02:08:35 +02:00
|
|
|
{
|
2018-12-05 01:52:39 +01:00
|
|
|
int PalmaConnectionHandle = Context.RequestData.ReadInt32();
|
2018-09-21 02:08:35 +02:00
|
|
|
|
2018-12-05 01:52:39 +01:00
|
|
|
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. PalmaConnectionHandle: {PalmaConnectionHandle}");
|
2018-09-21 02:08:35 +02:00
|
|
|
|
2018-12-05 01:52:39 +01:00
|
|
|
PalmaOperationCompleteEvent.ReadableEvent.Signal();
|
2018-11-20 01:01:36 +01:00
|
|
|
|
2018-09-21 02:08:35 +02:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
// AcquirePalmaOperationCompleteEvent(nn::hid::PalmaConnectionHandle) -> nn::sf::NativeHandle
|
2018-12-05 01:52:39 +01:00
|
|
|
public long AcquirePalmaOperationCompleteEvent(ServiceCtx Context)
|
2018-09-21 02:08:35 +02:00
|
|
|
{
|
2018-12-05 01:52:39 +01:00
|
|
|
int PalmaConnectionHandle = Context.RequestData.ReadInt32();
|
2018-09-21 02:08:35 +02:00
|
|
|
|
2018-12-05 01:52:39 +01:00
|
|
|
if (Context.Process.HandleTable.GenerateHandle(PalmaOperationCompleteEvent.ReadableEvent, out int Handle) != KernelResult.Success)
|
2018-09-23 20:11:46 +02:00
|
|
|
{
|
|
|
|
throw new InvalidOperationException("Out of handles!");
|
|
|
|
}
|
2018-09-21 02:08:35 +02:00
|
|
|
|
2018-12-05 01:52:39 +01:00
|
|
|
Context.Response.HandleDesc = IpcHandleDesc.MakeCopy(Handle);
|
2018-09-21 02:08:35 +02:00
|
|
|
|
2018-12-05 01:52:39 +01:00
|
|
|
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. PalmaConnectionHandle: {PalmaConnectionHandle}");
|
2018-09-21 02:08:35 +02:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
// GetPalmaOperationInfo(nn::hid::PalmaConnectionHandle) -> long Unknown0, buffer<Unknown>
|
2018-12-05 01:52:39 +01:00
|
|
|
public long GetPalmaOperationInfo(ServiceCtx Context)
|
2018-09-21 02:08:35 +02:00
|
|
|
{
|
2018-12-05 01:52:39 +01:00
|
|
|
int PalmaConnectionHandle = Context.RequestData.ReadInt32();
|
2018-09-21 02:08:35 +02:00
|
|
|
|
2018-12-05 01:52:39 +01:00
|
|
|
long Unknown0 = 0; //Counter?
|
2018-09-21 02:08:35 +02:00
|
|
|
|
2018-12-05 01:52:39 +01:00
|
|
|
Context.ResponseData.Write(Unknown0);
|
2018-09-21 02:08:35 +02:00
|
|
|
|
2018-12-05 01:52:39 +01:00
|
|
|
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. PalmaConnectionHandle: {PalmaConnectionHandle} - " +
|
|
|
|
$"Unknown0: {Unknown0}");
|
2018-09-21 02:08:35 +02:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
// PlayPalmaActivity(nn::hid::PalmaConnectionHandle, ulong Unknown0)
|
2018-12-05 01:52:39 +01:00
|
|
|
public long PlayPalmaActivity(ServiceCtx Context)
|
2018-09-21 02:08:35 +02:00
|
|
|
{
|
2018-12-05 01:52:39 +01:00
|
|
|
int PalmaConnectionHandle = Context.RequestData.ReadInt32();
|
|
|
|
long Unknown0 = Context.RequestData.ReadInt64();
|
2018-09-21 02:08:35 +02:00
|
|
|
|
2018-12-05 01:52:39 +01:00
|
|
|
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. PalmaConnectionHandle: {PalmaConnectionHandle} - " +
|
|
|
|
$"Unknown0: {Unknown0}");
|
2018-09-21 02:08:35 +02:00
|
|
|
|
2018-12-05 01:52:39 +01:00
|
|
|
PalmaOperationCompleteEvent.ReadableEvent.Signal();
|
2018-11-20 01:01:36 +01:00
|
|
|
|
2018-09-21 02:08:35 +02:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
// SetPalmaFrModeType(nn::hid::PalmaConnectionHandle, ulong FrModeType)
|
2018-12-05 01:52:39 +01:00
|
|
|
public long SetPalmaFrModeType(ServiceCtx Context)
|
2018-09-21 02:08:35 +02:00
|
|
|
{
|
2018-12-05 01:52:39 +01:00
|
|
|
int PalmaConnectionHandle = Context.RequestData.ReadInt32();
|
|
|
|
long FrModeType = Context.RequestData.ReadInt64();
|
2018-09-21 02:08:35 +02:00
|
|
|
|
2018-12-05 01:52:39 +01:00
|
|
|
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. PalmaConnectionHandle: {PalmaConnectionHandle} - " +
|
|
|
|
$"FrModeType: {FrModeType}");
|
2018-09-21 02:08:35 +02:00
|
|
|
|
2018-12-05 01:52:39 +01:00
|
|
|
PalmaOperationCompleteEvent.ReadableEvent.Signal();
|
2018-11-20 01:01:36 +01:00
|
|
|
|
2018-09-21 02:08:35 +02:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
// ReadPalmaStep(nn::hid::PalmaConnectionHandle)
|
2018-12-05 01:52:39 +01:00
|
|
|
public long ReadPalmaStep(ServiceCtx Context)
|
2018-09-21 02:08:35 +02:00
|
|
|
{
|
2018-12-05 01:52:39 +01:00
|
|
|
int PalmaConnectionHandle = Context.RequestData.ReadInt32();
|
2018-09-21 02:08:35 +02:00
|
|
|
|
2018-12-05 01:52:39 +01:00
|
|
|
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. PalmaConnectionHandle: {PalmaConnectionHandle}");
|
2018-09-21 02:08:35 +02:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
// EnablePalmaStep(nn::hid::PalmaConnectionHandle, bool Enable)
|
2018-12-05 01:52:39 +01:00
|
|
|
public long EnablePalmaStep(ServiceCtx Context)
|
2018-09-21 02:08:35 +02:00
|
|
|
{
|
2018-12-05 01:52:39 +01:00
|
|
|
int PalmaConnectionHandle = Context.RequestData.ReadInt32();
|
|
|
|
bool EnabledPalmaStep = Context.RequestData.ReadBoolean();
|
2018-09-21 02:08:35 +02:00
|
|
|
|
2018-12-05 01:52:39 +01:00
|
|
|
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. PalmaConnectionHandle: {PalmaConnectionHandle} - " +
|
|
|
|
$"EnabledPalmaStep: {EnabledPalmaStep}");
|
2018-09-21 02:08:35 +02:00
|
|
|
|
2018-12-05 01:52:39 +01:00
|
|
|
PalmaOperationCompleteEvent.ReadableEvent.Signal();
|
2018-11-20 01:01:36 +01:00
|
|
|
|
2018-09-21 02:08:35 +02:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
// SuspendPalmaStep(nn::hid::PalmaConnectionHandle)
|
2018-12-05 01:52:39 +01:00
|
|
|
public long SuspendPalmaStep(ServiceCtx Context)
|
2018-09-21 02:08:35 +02:00
|
|
|
{
|
2018-12-05 01:52:39 +01:00
|
|
|
int PalmaConnectionHandle = Context.RequestData.ReadInt32();
|
2018-09-21 02:08:35 +02:00
|
|
|
|
2018-12-05 01:52:39 +01:00
|
|
|
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. PalmaConnectionHandle: {PalmaConnectionHandle}");
|
2018-09-21 02:08:35 +02:00
|
|
|
|
2018-12-05 01:52:39 +01:00
|
|
|
PalmaOperationCompleteEvent.ReadableEvent.Signal();
|
2018-11-20 01:01:36 +01:00
|
|
|
|
2018-09-21 02:08:35 +02:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
// ResetPalmaStep(nn::hid::PalmaConnectionHandle)
|
2018-12-05 01:52:39 +01:00
|
|
|
public long ResetPalmaStep(ServiceCtx Context)
|
2018-09-21 02:08:35 +02:00
|
|
|
{
|
2018-12-05 01:52:39 +01:00
|
|
|
int PalmaConnectionHandle = Context.RequestData.ReadInt32();
|
2018-09-21 02:08:35 +02:00
|
|
|
|
2018-12-05 01:52:39 +01:00
|
|
|
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. PalmaConnectionHandle: {PalmaConnectionHandle}");
|
2018-09-21 02:08:35 +02:00
|
|
|
|
2018-12-05 01:52:39 +01:00
|
|
|
PalmaOperationCompleteEvent.ReadableEvent.Signal();
|
2018-11-20 01:01:36 +01:00
|
|
|
|
2018-09-21 02:08:35 +02:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
// ReadPalmaApplicationSection(nn::hid::PalmaConnectionHandle, ulong Unknown0, ulong Unknown1)
|
2018-12-05 01:52:39 +01:00
|
|
|
public long ReadPalmaApplicationSection(ServiceCtx Context)
|
2018-09-21 02:08:35 +02:00
|
|
|
{
|
2018-12-05 01:52:39 +01:00
|
|
|
int PalmaConnectionHandle = Context.RequestData.ReadInt32();
|
|
|
|
long Unknown0 = Context.RequestData.ReadInt64();
|
|
|
|
long Unknown1 = Context.RequestData.ReadInt64();
|
2018-09-21 02:08:35 +02:00
|
|
|
|
2018-12-05 01:52:39 +01:00
|
|
|
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. PalmaConnectionHandle: {PalmaConnectionHandle} - " +
|
|
|
|
$"Unknown0: {Unknown0} - " +
|
|
|
|
$"Unknown1: {Unknown1}");
|
2018-09-21 02:08:35 +02:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
// WritePalmaApplicationSection(nn::hid::PalmaConnectionHandle, ulong Unknown0, ulong Unknown1, nn::hid::PalmaApplicationSectionAccessBuffer)
|
2018-12-05 01:52:39 +01:00
|
|
|
public long WritePalmaApplicationSection(ServiceCtx Context)
|
2018-09-21 02:08:35 +02:00
|
|
|
{
|
2018-12-05 01:52:39 +01:00
|
|
|
int PalmaConnectionHandle = Context.RequestData.ReadInt32();
|
|
|
|
long Unknown0 = Context.RequestData.ReadInt64();
|
|
|
|
long Unknown1 = Context.RequestData.ReadInt64();
|
2018-09-21 02:08:35 +02:00
|
|
|
// nn::hid::PalmaApplicationSectionAccessBuffer cast is unknown
|
|
|
|
|
2018-12-05 01:52:39 +01:00
|
|
|
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. PalmaConnectionHandle: {PalmaConnectionHandle} - " +
|
|
|
|
$"Unknown0: {Unknown0} - " +
|
|
|
|
$"Unknown1: {Unknown1}");
|
2018-09-21 02:08:35 +02:00
|
|
|
|
2018-12-05 01:52:39 +01:00
|
|
|
PalmaOperationCompleteEvent.ReadableEvent.Signal();
|
2018-11-20 01:01:36 +01:00
|
|
|
|
2018-09-21 02:08:35 +02:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
// ReadPalmaUniqueCode(nn::hid::PalmaConnectionHandle)
|
2018-12-05 01:52:39 +01:00
|
|
|
public long ReadPalmaUniqueCode(ServiceCtx Context)
|
2018-09-21 02:08:35 +02:00
|
|
|
{
|
2018-12-05 01:52:39 +01:00
|
|
|
int PalmaConnectionHandle = Context.RequestData.ReadInt32();
|
2018-09-21 02:08:35 +02:00
|
|
|
|
2018-12-05 01:52:39 +01:00
|
|
|
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. PalmaConnectionHandle: {PalmaConnectionHandle}");
|
2018-09-21 02:08:35 +02:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
// SetPalmaUniqueCodeInvalid(nn::hid::PalmaConnectionHandle)
|
2018-12-05 01:52:39 +01:00
|
|
|
public long SetPalmaUniqueCodeInvalid(ServiceCtx Context)
|
2018-09-21 02:08:35 +02:00
|
|
|
{
|
2018-12-05 01:52:39 +01:00
|
|
|
int PalmaConnectionHandle = Context.RequestData.ReadInt32();
|
2018-09-21 02:08:35 +02:00
|
|
|
|
2018-12-05 01:52:39 +01:00
|
|
|
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. PalmaConnectionHandle: {PalmaConnectionHandle}");
|
2018-09-21 02:08:35 +02:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
// SetNpadCommunicationMode(long CommunicationMode, nn::applet::AppletResourceUserId)
|
2018-12-05 01:52:39 +01:00
|
|
|
public long SetNpadCommunicationMode(ServiceCtx Context)
|
2018-09-21 02:08:35 +02:00
|
|
|
{
|
2018-12-05 01:52:39 +01:00
|
|
|
NpadCommunicationMode = Context.RequestData.ReadInt64();
|
|
|
|
long AppletResourceUserId = Context.RequestData.ReadInt64();
|
2018-09-21 02:08:35 +02:00
|
|
|
|
2018-12-05 01:52:39 +01:00
|
|
|
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. AppletResourceUserId: {AppletResourceUserId} - " +
|
|
|
|
$"NpadCommunicationMode: {NpadCommunicationMode}");
|
2018-09-21 02:08:35 +02:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
// GetNpadCommunicationMode() -> long CommunicationMode
|
2018-12-05 01:52:39 +01:00
|
|
|
public long GetNpadCommunicationMode(ServiceCtx Context)
|
2018-09-21 02:08:35 +02:00
|
|
|
{
|
2018-12-05 01:52:39 +01:00
|
|
|
Context.ResponseData.Write(NpadCommunicationMode);
|
2018-09-21 02:08:35 +02:00
|
|
|
|
2018-12-05 01:52:39 +01:00
|
|
|
Logger.PrintStub(LogClass.ServiceHid, $"Stubbed. CommunicationMode: {NpadCommunicationMode}");
|
2018-04-17 02:24:42 +02:00
|
|
|
|
2018-03-04 04:06:44 +01:00
|
|
|
return 0;
|
|
|
|
}
|
2018-02-25 05:34:16 +01:00
|
|
|
}
|
2018-04-17 18:40:22 +02:00
|
|
|
}
|