mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2025-12-11 16:36:58 +00:00
Stub IWriterForApplication: 0 (CreateContextRegistrar) (ryubing/ryujinx!183)
See merge request ryubing/ryujinx!183
This commit is contained in:
parent
7b39ff36c0
commit
456db46065
3 changed files with 42 additions and 0 deletions
|
|
@ -35,6 +35,7 @@ namespace Ryujinx.Common.Logging
|
|||
ServiceBsd,
|
||||
ServiceBtm,
|
||||
ServiceCaps,
|
||||
ServiceEctx,
|
||||
ServiceFatal,
|
||||
ServiceFriend,
|
||||
ServiceFs,
|
||||
|
|
|
|||
32
src/Ryujinx.HLE/HOS/Services/Ectx/IContextRegistrar.cs
Normal file
32
src/Ryujinx.HLE/HOS/Services/Ectx/IContextRegistrar.cs
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
using System;
|
||||
using Ryujinx.Common.Logging;
|
||||
using Ryujinx.Horizon.Common;
|
||||
|
||||
namespace Ryujinx.HLE.HOS.Services.Ectx
|
||||
{
|
||||
class IContextRegistrar : DisposableIpcService
|
||||
{
|
||||
public IContextRegistrar(ServiceCtx context) { }
|
||||
|
||||
[CommandCmif(0)] // 11.0.0+
|
||||
// Complete(nn::Result result, buffer<bytes, 5> raw_context) -> (i32 context_descriptor)
|
||||
public ResultCode Complete(ServiceCtx context)
|
||||
{
|
||||
Result result = new(context.RequestData.ReadInt32());
|
||||
ulong rawContextPosition = context.Request.SendBuff[0].Position;
|
||||
ulong rawContextSize = context.Request.SendBuff[0].Size;
|
||||
|
||||
byte[] rawContext = new byte[rawContextSize];
|
||||
|
||||
context.Memory.Read(rawContextPosition, rawContext);
|
||||
|
||||
context.ResponseData.Write(0); // TODO: return context_descriptor
|
||||
|
||||
Logger.Stub?.PrintStub(LogClass.ServiceEctx, $"Result: {result}, rawContext: {Convert.ToHexString(rawContext)}" );
|
||||
|
||||
return ResultCode.Success;
|
||||
}
|
||||
|
||||
protected override void Dispose(bool isDisposing) { }
|
||||
}
|
||||
}
|
||||
|
|
@ -4,5 +4,14 @@ namespace Ryujinx.HLE.HOS.Services.Ectx
|
|||
class IWriterForApplication : IpcService
|
||||
{
|
||||
public IWriterForApplication(ServiceCtx context) { }
|
||||
|
||||
[CommandCmif(0)]
|
||||
// CreateContextRegistrar() -> object<nn::err::context::IContextRegistrar>
|
||||
public ResultCode CreateContextRegistrar(ServiceCtx context)
|
||||
{
|
||||
MakeObject(context, new IContextRegistrar(context));
|
||||
|
||||
return ResultCode.Success;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue