mirror of
https://git.naxdy.org/Mirror/Ryujinx.git
synced 2025-03-26 08:10:18 +00:00
* Horizon: Implement arp:r and arp:w services * Fix formatting * Remove HLE arp services * Revert "Remove HLE arp services" This reverts commit c576fcccadb963db56b96bacabd1c1ac7abfb1ab. * Keep LibHac impl since it's used in bcat * Addresses gdkchan's feedback * ArpApi in PrepoIpcServer and remove LmApi * Fix 2 * Fixes ArpApi init * Fix encoding * Update PrepoService.cs * Fix prepo
52 lines
1.6 KiB
C#
52 lines
1.6 KiB
C#
using Ryujinx.Horizon.Common;
|
|
using Ryujinx.Horizon.Sdk.Arp;
|
|
using Ryujinx.Horizon.Sdk.Arp.Detail;
|
|
using Ryujinx.Horizon.Sdk.Ns;
|
|
using Ryujinx.Horizon.Sdk.Sf;
|
|
using Ryujinx.Horizon.Sdk.Sf.Hipc;
|
|
using System;
|
|
|
|
namespace Ryujinx.Horizon.Arp.Ipc
|
|
{
|
|
partial class Registrar : IRegistrar, IServiceObject
|
|
{
|
|
private readonly ApplicationInstance _applicationInstance;
|
|
|
|
public Registrar(ApplicationInstance applicationInstance)
|
|
{
|
|
_applicationInstance = applicationInstance;
|
|
}
|
|
|
|
[CmifCommand(0)]
|
|
public Result Issue(out ulong applicationInstanceId)
|
|
{
|
|
throw new NotImplementedException();
|
|
}
|
|
|
|
[CmifCommand(1)]
|
|
public Result SetApplicationLaunchProperty(ApplicationLaunchProperty applicationLaunchProperty)
|
|
{
|
|
if (_applicationInstance.LaunchProperty != null)
|
|
{
|
|
return ArpResult.DataAlreadyBound;
|
|
}
|
|
|
|
_applicationInstance.LaunchProperty = applicationLaunchProperty;
|
|
|
|
return Result.Success;
|
|
}
|
|
|
|
[CmifCommand(2)]
|
|
public Result SetApplicationControlProperty([Buffer(HipcBufferFlags.In | HipcBufferFlags.MapAlias | HipcBufferFlags.FixedSize, 0x4000)] in ApplicationControlProperty applicationControlProperty)
|
|
{
|
|
if (_applicationInstance.ControlProperty != null)
|
|
{
|
|
return ArpResult.DataAlreadyBound;
|
|
}
|
|
|
|
_applicationInstance.ControlProperty = applicationControlProperty;
|
|
|
|
return Result.Success;
|
|
}
|
|
}
|
|
}
|