Rename services with the official interface names

This commit is contained in:
gdkchan 2018-04-06 01:01:52 -03:00
parent f15b1c76a1
commit 69e32e5bbc
29 changed files with 236 additions and 196 deletions

View file

@ -0,0 +1,29 @@
using Ryujinx.Core.OsHle.Ipc;
using System.Collections.Generic;
namespace Ryujinx.Core.OsHle.Services.Vi
{
class IApplicationRootService : IpcService
{
private Dictionary<int, ServiceProcessRequest> m_Commands;
public override IReadOnlyDictionary<int, ServiceProcessRequest> Commands => m_Commands;
public IApplicationRootService()
{
m_Commands = new Dictionary<int, ServiceProcessRequest>()
{
{ 0, GetDisplayService }
};
}
public long GetDisplayService(ServiceCtx Context)
{
int ServiceType = Context.RequestData.ReadInt32();
MakeObject(Context, new IApplicationDisplayService());
return 0;
}
}
}

View file

@ -3,18 +3,16 @@ using System.Collections.Generic;
namespace Ryujinx.Core.OsHle.Services.Vi
{
class ServiceVi : IpcService
class IManagerRootService : IpcService
{
private Dictionary<int, ServiceProcessRequest> m_Commands;
public override IReadOnlyDictionary<int, ServiceProcessRequest> Commands => m_Commands;
public ServiceVi()
public IManagerRootService()
{
m_Commands = new Dictionary<int, ServiceProcessRequest>()
{
{ 0, GetDisplayService },
{ 1, GetDisplayService },
{ 2, GetDisplayService }
};
}

View file

@ -0,0 +1,29 @@
using Ryujinx.Core.OsHle.Ipc;
using System.Collections.Generic;
namespace Ryujinx.Core.OsHle.Services.Vi
{
class ISystemRootService : IpcService
{
private Dictionary<int, ServiceProcessRequest> m_Commands;
public override IReadOnlyDictionary<int, ServiceProcessRequest> Commands => m_Commands;
public ISystemRootService()
{
m_Commands = new Dictionary<int, ServiceProcessRequest>()
{
{ 1, GetDisplayService }
};
}
public long GetDisplayService(ServiceCtx Context)
{
int ServiceType = Context.RequestData.ReadInt32();
MakeObject(Context, new IApplicationDisplayService());
return 0;
}
}
}

View file

@ -62,7 +62,7 @@ namespace Ryujinx.Core.OsHle.Services.Android
private BufferEntry[] BufferQueue;
private ManualResetEvent WaitBufferFree;
private object RenderQueueLock;
private int RenderQueueCount;
@ -85,7 +85,7 @@ namespace Ryujinx.Core.OsHle.Services.Android
{ ("android.gui.IGraphicBufferProducer", 0xb), GbpDisconnect },
{ ("android.gui.IGraphicBufferProducer", 0xe), GbpPreallocBuffer }
};
this.Renderer = Renderer;
this.ReleaseEvent = ReleaseEvent;
@ -139,7 +139,7 @@ namespace Ryujinx.Core.OsHle.Services.Android
using (MemoryStream MS = new MemoryStream())
{
BinaryWriter Writer = new BinaryWriter(MS);
BufferEntry Entry = BufferQueue[Slot];
int BufferCount = 1; //?
@ -243,7 +243,7 @@ namespace Ryujinx.Core.OsHle.Services.Android
private long GbpPreallocBuffer(ServiceCtx Context, BinaryReader ParcelReader)
{
int Slot = ParcelReader.ReadInt32();
int BufferCount = ParcelReader.ReadInt32();
long BufferSize = ParcelReader.ReadInt64();
@ -290,10 +290,10 @@ namespace Ryujinx.Core.OsHle.Services.Android
NvMap Map = GetNvMap(Context, Slot);
NvMapFb MapFb = (NvMapFb)ServiceNvDrv.NvMapsFb.GetData(Context.Process, 0);
NvMapFb MapFb = (NvMapFb)INvDrvServices.NvMapsFb.GetData(Context.Process, 0);
long Address = Map.CpuAddress;
if (MapFb.HasBufferOffset(Slot))
{
Address += MapFb.GetBufferOffset(Slot);
@ -413,7 +413,7 @@ namespace Ryujinx.Core.OsHle.Services.Android
NvMapHandle = BitConverter.ToInt32(RawValue, 0);
}
return ServiceNvDrv.NvMaps.GetData<NvMap>(Context.Process, NvMapHandle);
return INvDrvServices.NvMaps.GetData<NvMap>(Context.Process, NvMapHandle);
}
private int GetFreeSlotBlocking(int Width, int Height)