Horizon: Implement arp:r and arp:w services (#5802)
* 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
This commit is contained in:
52
src/Ryujinx.Horizon/Arp/Ipc/Registrar.cs
Normal file
52
src/Ryujinx.Horizon/Arp/Ipc/Registrar.cs
Normal file
@@ -0,0 +1,52 @@
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user