aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.HLE/HOS/Services/Vi
diff options
context:
space:
mode:
Diffstat (limited to 'Ryujinx.HLE/HOS/Services/Vi')
-rw-r--r--Ryujinx.HLE/HOS/Services/Vi/Display.cs6
-rw-r--r--Ryujinx.HLE/HOS/Services/Vi/GbpBuffer.cs70
-rw-r--r--Ryujinx.HLE/HOS/Services/Vi/IApplicationDisplayService.cs188
-rw-r--r--Ryujinx.HLE/HOS/Services/Vi/IApplicationRootService.cs12
-rw-r--r--Ryujinx.HLE/HOS/Services/Vi/IHOSBinderDriver.cs74
-rw-r--r--Ryujinx.HLE/HOS/Services/Vi/IManagerDisplayService.cs16
-rw-r--r--Ryujinx.HLE/HOS/Services/Vi/IManagerRootService.cs12
-rw-r--r--Ryujinx.HLE/HOS/Services/Vi/ISystemDisplayService.cs20
-rw-r--r--Ryujinx.HLE/HOS/Services/Vi/ISystemRootService.cs12
-rw-r--r--Ryujinx.HLE/HOS/Services/Vi/NvFlinger.cs332
-rw-r--r--Ryujinx.HLE/HOS/Services/Vi/Parcel.cs50
11 files changed, 396 insertions, 396 deletions
diff --git a/Ryujinx.HLE/HOS/Services/Vi/Display.cs b/Ryujinx.HLE/HOS/Services/Vi/Display.cs
index 54e00789..50fe5e1d 100644
--- a/Ryujinx.HLE/HOS/Services/Vi/Display.cs
+++ b/Ryujinx.HLE/HOS/Services/Vi/Display.cs
@@ -2,11 +2,11 @@ namespace Ryujinx.HLE.HOS.Services.Vi
{
class Display
{
- public string Name { get; }
+ public string Name { get; private set; }
- public Display(string name)
+ public Display(string Name)
{
- Name = name;
+ this.Name = Name;
}
}
} \ No newline at end of file
diff --git a/Ryujinx.HLE/HOS/Services/Vi/GbpBuffer.cs b/Ryujinx.HLE/HOS/Services/Vi/GbpBuffer.cs
index 4a247d1b..4f00c3de 100644
--- a/Ryujinx.HLE/HOS/Services/Vi/GbpBuffer.cs
+++ b/Ryujinx.HLE/HOS/Services/Vi/GbpBuffer.cs
@@ -4,57 +4,57 @@ namespace Ryujinx.HLE.HOS.Services.Android
{
struct GbpBuffer
{
- public int Magic { get; }
- public int Width { get; }
- public int Height { get; }
- public int Stride { get; }
- public int Format { get; }
- public int Usage { get; }
+ public int Magic { get; private set; }
+ public int Width { get; private set; }
+ public int Height { get; private set; }
+ public int Stride { get; private set; }
+ public int Format { get; private set; }
+ public int Usage { get; private set; }
- public int Pid { get; }
- public int RefCount { get; }
+ public int Pid { get; private set; }
+ public int RefCount { get; private set; }
- public int FdsCount { get; }
- public int IntsCount { get; }
+ public int FdsCount { get; private set; }
+ public int IntsCount { get; private set; }
- public byte[] RawData { get; }
+ public byte[] RawData { get; private set; }
public int Size => RawData.Length + 10 * 4;
- public GbpBuffer(BinaryReader reader)
+ public GbpBuffer(BinaryReader Reader)
{
- Magic = reader.ReadInt32();
- Width = reader.ReadInt32();
- Height = reader.ReadInt32();
- Stride = reader.ReadInt32();
- Format = reader.ReadInt32();
- Usage = reader.ReadInt32();
+ Magic = Reader.ReadInt32();
+ Width = Reader.ReadInt32();
+ Height = Reader.ReadInt32();
+ Stride = Reader.ReadInt32();
+ Format = Reader.ReadInt32();
+ Usage = Reader.ReadInt32();
- Pid = reader.ReadInt32();
- RefCount = reader.ReadInt32();
+ Pid = Reader.ReadInt32();
+ RefCount = Reader.ReadInt32();
- FdsCount = reader.ReadInt32();
- IntsCount = reader.ReadInt32();
+ FdsCount = Reader.ReadInt32();
+ IntsCount = Reader.ReadInt32();
- RawData = reader.ReadBytes((FdsCount + IntsCount) * 4);
+ RawData = Reader.ReadBytes((FdsCount + IntsCount) * 4);
}
- public void Write(BinaryWriter writer)
+ public void Write(BinaryWriter Writer)
{
- writer.Write(Magic);
- writer.Write(Width);
- writer.Write(Height);
- writer.Write(Stride);
- writer.Write(Format);
- writer.Write(Usage);
+ Writer.Write(Magic);
+ Writer.Write(Width);
+ Writer.Write(Height);
+ Writer.Write(Stride);
+ Writer.Write(Format);
+ Writer.Write(Usage);
- writer.Write(Pid);
- writer.Write(RefCount);
+ Writer.Write(Pid);
+ Writer.Write(RefCount);
- writer.Write(FdsCount);
- writer.Write(IntsCount);
+ Writer.Write(FdsCount);
+ Writer.Write(IntsCount);
- writer.Write(RawData);
+ Writer.Write(RawData);
}
}
} \ No newline at end of file
diff --git a/Ryujinx.HLE/HOS/Services/Vi/IApplicationDisplayService.cs b/Ryujinx.HLE/HOS/Services/Vi/IApplicationDisplayService.cs
index 63e542d2..5d1ddd84 100644
--- a/Ryujinx.HLE/HOS/Services/Vi/IApplicationDisplayService.cs
+++ b/Ryujinx.HLE/HOS/Services/Vi/IApplicationDisplayService.cs
@@ -12,15 +12,15 @@ namespace Ryujinx.HLE.HOS.Services.Vi
{
class IApplicationDisplayService : IpcService
{
- private Dictionary<int, ServiceProcessRequest> _commands;
+ private Dictionary<int, ServiceProcessRequest> m_Commands;
- public override IReadOnlyDictionary<int, ServiceProcessRequest> Commands => _commands;
+ public override IReadOnlyDictionary<int, ServiceProcessRequest> Commands => m_Commands;
- private IdDictionary _displays;
+ private IdDictionary Displays;
public IApplicationDisplayService()
{
- _commands = new Dictionary<int, ServiceProcessRequest>
+ m_Commands = new Dictionary<int, ServiceProcessRequest>()
{
{ 100, GetRelayService },
{ 101, GetSystemDisplayService },
@@ -38,205 +38,205 @@ namespace Ryujinx.HLE.HOS.Services.Vi
{ 5202, GetDisplayVSyncEvent }
};
- _displays = new IdDictionary();
+ Displays = new IdDictionary();
}
- public long GetRelayService(ServiceCtx context)
+ public long GetRelayService(ServiceCtx Context)
{
- MakeObject(context, new IhosBinderDriver(
- context.Device.System,
- context.Device.Gpu.Renderer));
+ MakeObject(Context, new IHOSBinderDriver(
+ Context.Device.System,
+ Context.Device.Gpu.Renderer));
return 0;
}
- public long GetSystemDisplayService(ServiceCtx context)
+ public long GetSystemDisplayService(ServiceCtx Context)
{
- MakeObject(context, new ISystemDisplayService());
+ MakeObject(Context, new ISystemDisplayService());
return 0;
}
- public long GetManagerDisplayService(ServiceCtx context)
+ public long GetManagerDisplayService(ServiceCtx Context)
{
- MakeObject(context, new IManagerDisplayService());
+ MakeObject(Context, new IManagerDisplayService());
return 0;
}
- public long GetIndirectDisplayTransactionService(ServiceCtx context)
+ public long GetIndirectDisplayTransactionService(ServiceCtx Context)
{
- MakeObject(context, new IhosBinderDriver(
- context.Device.System,
- context.Device.Gpu.Renderer));
+ MakeObject(Context, new IHOSBinderDriver(
+ Context.Device.System,
+ Context.Device.Gpu.Renderer));
return 0;
}
- public long ListDisplays(ServiceCtx context)
+ public long ListDisplays(ServiceCtx Context)
{
- long recBuffPtr = context.Request.ReceiveBuff[0].Position;
+ long RecBuffPtr = Context.Request.ReceiveBuff[0].Position;
- MemoryHelper.FillWithZeros(context.Memory, recBuffPtr, 0x60);
+ MemoryHelper.FillWithZeros(Context.Memory, RecBuffPtr, 0x60);
//Add only the default display to buffer
- context.Memory.WriteBytes(recBuffPtr, Encoding.ASCII.GetBytes("Default"));
- context.Memory.WriteInt64(recBuffPtr + 0x40, 0x1L);
- context.Memory.WriteInt64(recBuffPtr + 0x48, 0x1L);
- context.Memory.WriteInt64(recBuffPtr + 0x50, 1920L);
- context.Memory.WriteInt64(recBuffPtr + 0x58, 1080L);
+ Context.Memory.WriteBytes(RecBuffPtr, Encoding.ASCII.GetBytes("Default"));
+ Context.Memory.WriteInt64(RecBuffPtr + 0x40, 0x1L);
+ Context.Memory.WriteInt64(RecBuffPtr + 0x48, 0x1L);
+ Context.Memory.WriteInt64(RecBuffPtr + 0x50, 1920L);
+ Context.Memory.WriteInt64(RecBuffPtr + 0x58, 1080L);
- context.ResponseData.Write(1L);
+ Context.ResponseData.Write(1L);
return 0;
}
- public long OpenDisplay(ServiceCtx context)
+ public long OpenDisplay(ServiceCtx Context)
{
- string name = GetDisplayName(context);
+ string Name = GetDisplayName(Context);
- long displayId = _displays.Add(new Display(name));
+ long DisplayId = Displays.Add(new Display(Name));
- context.ResponseData.Write(displayId);
+ Context.ResponseData.Write(DisplayId);
return 0;
}
- public long CloseDisplay(ServiceCtx context)
+ public long CloseDisplay(ServiceCtx Context)
{
- int displayId = context.RequestData.ReadInt32();
+ int DisplayId = Context.RequestData.ReadInt32();
- _displays.Delete(displayId);
+ Displays.Delete(DisplayId);
return 0;
}
- public long GetDisplayResolution(ServiceCtx context)
+ public long GetDisplayResolution(ServiceCtx Context)
{
- long displayId = context.RequestData.ReadInt32();
+ long DisplayId = Context.RequestData.ReadInt32();
- context.ResponseData.Write(1280);
- context.ResponseData.Write(720);
+ Context.ResponseData.Write(1280);
+ Context.ResponseData.Write(720);
return 0;
}
- public long OpenLayer(ServiceCtx context)
+ public long OpenLayer(ServiceCtx Context)
{
- long layerId = context.RequestData.ReadInt64();
- long userId = context.RequestData.ReadInt64();
+ long LayerId = Context.RequestData.ReadInt64();
+ long UserId = Context.RequestData.ReadInt64();
- long parcelPtr = context.Request.ReceiveBuff[0].Position;
+ long ParcelPtr = Context.Request.ReceiveBuff[0].Position;
- byte[] parcel = MakeIGraphicsBufferProducer(parcelPtr);
+ byte[] Parcel = MakeIGraphicsBufferProducer(ParcelPtr);
- context.Memory.WriteBytes(parcelPtr, parcel);
+ Context.Memory.WriteBytes(ParcelPtr, Parcel);
- context.ResponseData.Write((long)parcel.Length);
+ Context.ResponseData.Write((long)Parcel.Length);
return 0;
}
- public long CloseLayer(ServiceCtx context)
+ public long CloseLayer(ServiceCtx Context)
{
- long layerId = context.RequestData.ReadInt64();
+ long LayerId = Context.RequestData.ReadInt64();
return 0;
}
- public long CreateStrayLayer(ServiceCtx context)
+ public long CreateStrayLayer(ServiceCtx Context)
{
- long layerFlags = context.RequestData.ReadInt64();
- long displayId = context.RequestData.ReadInt64();
+ long LayerFlags = Context.RequestData.ReadInt64();
+ long DisplayId = Context.RequestData.ReadInt64();
- long parcelPtr = context.Request.ReceiveBuff[0].Position;
+ long ParcelPtr = Context.Request.ReceiveBuff[0].Position;
- Display disp = _displays.GetData<Display>((int)displayId);
+ Display Disp = Displays.GetData<Display>((int)DisplayId);
- byte[] parcel = MakeIGraphicsBufferProducer(parcelPtr);
+ byte[] Parcel = MakeIGraphicsBufferProducer(ParcelPtr);
- context.Memory.WriteBytes(parcelPtr, parcel);
+ Context.Memory.WriteBytes(ParcelPtr, Parcel);
- context.ResponseData.Write(0L);
- context.ResponseData.Write((long)parcel.Length);
+ Context.ResponseData.Write(0L);
+ Context.ResponseData.Write((long)Parcel.Length);
return 0;
}
- public long DestroyStrayLayer(ServiceCtx context)
+ public long DestroyStrayLayer(ServiceCtx Context)
{
return 0;
}
- public long SetLayerScalingMode(ServiceCtx context)
+ public long SetLayerScalingMode(ServiceCtx Context)
{
- int scalingMode = context.RequestData.ReadInt32();
- long unknown = context.RequestData.ReadInt64();
+ int ScalingMode = Context.RequestData.ReadInt32();
+ long Unknown = Context.RequestData.ReadInt64();
return 0;
}
- public long GetDisplayVSyncEvent(ServiceCtx context)
+ public long GetDisplayVSyncEvent(ServiceCtx Context)
{
- string name = GetDisplayName(context);
+ string Name = GetDisplayName(Context);
- if (context.Process.HandleTable.GenerateHandle(context.Device.System.VsyncEvent.ReadableEvent, out int handle) != KernelResult.Success)
+ if (Context.Process.HandleTable.GenerateHandle(Context.Device.System.VsyncEvent.ReadableEvent, out int Handle) != KernelResult.Success)
{
throw new InvalidOperationException("Out of handles!");
}
- context.Response.HandleDesc = IpcHandleDesc.MakeCopy(handle);
+ Context.Response.HandleDesc = IpcHandleDesc.MakeCopy(Handle);
return 0;
}
- private byte[] MakeIGraphicsBufferProducer(long basePtr)
+ private byte[] MakeIGraphicsBufferProducer(long BasePtr)
{
- long id = 0x20;
- long cookiePtr = 0L;
+ long Id = 0x20;
+ long CookiePtr = 0L;
- using (MemoryStream ms = new MemoryStream())
+ using (MemoryStream MS = new MemoryStream())
{
- BinaryWriter writer = new BinaryWriter(ms);
+ BinaryWriter Writer = new BinaryWriter(MS);
//flat_binder_object (size is 0x28)
- writer.Write(2); //Type (BINDER_TYPE_WEAK_BINDER)
- writer.Write(0); //Flags
- writer.Write((int)(id >> 0));
- writer.Write((int)(id >> 32));
- writer.Write((int)(cookiePtr >> 0));
- writer.Write((int)(cookiePtr >> 32));
- writer.Write((byte)'d');
- writer.Write((byte)'i');
- writer.Write((byte)'s');
- writer.Write((byte)'p');
- writer.Write((byte)'d');
- writer.Write((byte)'r');
- writer.Write((byte)'v');
- writer.Write((byte)'\0');
- writer.Write(0L); //Pad
-
- return MakeParcel(ms.ToArray(), new byte[] { 0, 0, 0, 0 });
+ Writer.Write(2); //Type (BINDER_TYPE_WEAK_BINDER)
+ Writer.Write(0); //Flags
+ Writer.Write((int)(Id >> 0));
+ Writer.Write((int)(Id >> 32));
+ Writer.Write((int)(CookiePtr >> 0));
+ Writer.Write((int)(CookiePtr >> 32));
+ Writer.Write((byte)'d');
+ Writer.Write((byte)'i');
+ Writer.Write((byte)'s');
+ Writer.Write((byte)'p');
+ Writer.Write((byte)'d');
+ Writer.Write((byte)'r');
+ Writer.Write((byte)'v');
+ Writer.Write((byte)'\0');
+ Writer.Write(0L); //Pad
+
+ return MakeParcel(MS.ToArray(), new byte[] { 0, 0, 0, 0 });
}
}
- private string GetDisplayName(ServiceCtx context)
+ private string GetDisplayName(ServiceCtx Context)
{
- string name = string.Empty;
+ string Name = string.Empty;
- for (int index = 0; index < 8 &&
- context.RequestData.BaseStream.Position <
- context.RequestData.BaseStream.Length; index++)
+ for (int Index = 0; Index < 8 &&
+ Context.RequestData.BaseStream.Position <
+ Context.RequestData.BaseStream.Length; Index++)
{
- byte chr = context.RequestData.ReadByte();
+ byte Chr = Context.RequestData.ReadByte();
- if (chr >= 0x20 && chr < 0x7f)
+ if (Chr >= 0x20 && Chr < 0x7f)
{
- name += (char)chr;
+ Name += (char)Chr;
}
}
- return name;
+ return Name;
}
}
} \ No newline at end of file
diff --git a/Ryujinx.HLE/HOS/Services/Vi/IApplicationRootService.cs b/Ryujinx.HLE/HOS/Services/Vi/IApplicationRootService.cs
index 66ab16bd..e86734e6 100644
--- a/Ryujinx.HLE/HOS/Services/Vi/IApplicationRootService.cs
+++ b/Ryujinx.HLE/HOS/Services/Vi/IApplicationRootService.cs
@@ -5,23 +5,23 @@ namespace Ryujinx.HLE.HOS.Services.Vi
{
class IApplicationRootService : IpcService
{
- private Dictionary<int, ServiceProcessRequest> _commands;
+ private Dictionary<int, ServiceProcessRequest> m_Commands;
- public override IReadOnlyDictionary<int, ServiceProcessRequest> Commands => _commands;
+ public override IReadOnlyDictionary<int, ServiceProcessRequest> Commands => m_Commands;
public IApplicationRootService()
{
- _commands = new Dictionary<int, ServiceProcessRequest>
+ m_Commands = new Dictionary<int, ServiceProcessRequest>()
{
{ 0, GetDisplayService }
};
}
- public long GetDisplayService(ServiceCtx context)
+ public long GetDisplayService(ServiceCtx Context)
{
- int serviceType = context.RequestData.ReadInt32();
+ int ServiceType = Context.RequestData.ReadInt32();
- MakeObject(context, new IApplicationDisplayService());
+ MakeObject(Context, new IApplicationDisplayService());
return 0;
}
diff --git a/Ryujinx.HLE/HOS/Services/Vi/IHOSBinderDriver.cs b/Ryujinx.HLE/HOS/Services/Vi/IHOSBinderDriver.cs
index 7ca3053d..09a37b0f 100644
--- a/Ryujinx.HLE/HOS/Services/Vi/IHOSBinderDriver.cs
+++ b/Ryujinx.HLE/HOS/Services/Vi/IHOSBinderDriver.cs
@@ -7,19 +7,19 @@ using System.Collections.Generic;
namespace Ryujinx.HLE.HOS.Services.Vi
{
- class IhosBinderDriver : IpcService, IDisposable
+ class IHOSBinderDriver : IpcService, IDisposable
{
- private Dictionary<int, ServiceProcessRequest> _commands;
+ private Dictionary<int, ServiceProcessRequest> m_Commands;
- public override IReadOnlyDictionary<int, ServiceProcessRequest> Commands => _commands;
+ public override IReadOnlyDictionary<int, ServiceProcessRequest> Commands => m_Commands;
- private KEvent _binderEvent;
+ private KEvent BinderEvent;
- private NvFlinger _flinger;
+ private NvFlinger Flinger;
- public IhosBinderDriver(Horizon system, IGalRenderer renderer)
+ public IHOSBinderDriver(Horizon System, IGalRenderer Renderer)
{
- _commands = new Dictionary<int, ServiceProcessRequest>
+ m_Commands = new Dictionary<int, ServiceProcessRequest>()
{
{ 0, TransactParcel },
{ 1, AdjustRefcount },
@@ -27,62 +27,62 @@ namespace Ryujinx.HLE.HOS.Services.Vi
{ 3, TransactParcelAuto }
};
- _binderEvent = new KEvent(system);
+ BinderEvent = new KEvent(System);
- _binderEvent.ReadableEvent.Signal();
+ BinderEvent.ReadableEvent.Signal();
- _flinger = new NvFlinger(renderer, _binderEvent);
+ Flinger = new NvFlinger(Renderer, BinderEvent);
}
- public long TransactParcel(ServiceCtx context)
+ public long TransactParcel(ServiceCtx Context)
{
- int id = context.RequestData.ReadInt32();
- int code = context.RequestData.ReadInt32();
+ int Id = Context.RequestData.ReadInt32();
+ int Code = Context.RequestData.ReadInt32();
- long dataPos = context.Request.SendBuff[0].Position;
- long dataSize = context.Request.SendBuff[0].Size;
+ long DataPos = Context.Request.SendBuff[0].Position;
+ long DataSize = Context.Request.SendBuff[0].Size;
- byte[] data = context.Memory.ReadBytes(dataPos, dataSize);
+ byte[] Data = Context.Memory.ReadBytes(DataPos, DataSize);
- data = Parcel.GetParcelData(data);
+ Data = Parcel.GetParcelData(Data);
- return _flinger.ProcessParcelRequest(context, data, code);
+ return Flinger.ProcessParcelRequest(Context, Data, Code);
}
- public long TransactParcelAuto(ServiceCtx context)
+ public long TransactParcelAuto(ServiceCtx Context)
{
- int id = context.RequestData.ReadInt32();
- int code = context.RequestData.ReadInt32();
+ int Id = Context.RequestData.ReadInt32();
+ int Code = Context.RequestData.ReadInt32();
- (long dataPos, long dataSize) = context.Request.GetBufferType0x21();
+ (long DataPos, long DataSize) = Context.Request.GetBufferType0x21();
- byte[] data = context.Memory.ReadBytes(dataPos, dataSize);
+ byte[] Data = Context.Memory.ReadBytes(DataPos, DataSize);
- data = Parcel.GetParcelData(data);
+ Data = Parcel.GetParcelData(Data);
- return _flinger.ProcessParcelRequest(context, data, code);
+ return Flinger.ProcessParcelRequest(Context, Data, Code);
}
- public long AdjustRefcount(ServiceCtx context)
+ public long AdjustRefcount(ServiceCtx Context)
{
- int id = context.RequestData.ReadInt32();
- int addVal = context.RequestData.ReadInt32();
- int type = context.RequestData.ReadInt32();
+ int Id = Context.RequestData.ReadInt32();
+ int AddVal = Context.RequestData.ReadInt32();
+ int Type = Context.RequestData.ReadInt32();
return 0;
}
- public long GetNativeHandle(ServiceCtx context)
+ public long GetNativeHandle(ServiceCtx Context)
{
- int id = context.RequestData.ReadInt32();
- uint unk = context.RequestData.ReadUInt32();
+ int Id = Context.RequestData.ReadInt32();
+ uint Unk = Context.RequestData.ReadUInt32();
- if (context.Process.HandleTable.GenerateHandle(_binderEvent.ReadableEvent, out int handle) != KernelResult.Success)
+ if (Context.Process.HandleTable.GenerateHandle(BinderEvent.ReadableEvent, out int Handle) != KernelResult.Success)
{
throw new InvalidOperationException("Out of handles!");
}
- context.Response.HandleDesc = IpcHandleDesc.MakeMove(handle);
+ Context.Response.HandleDesc = IpcHandleDesc.MakeMove(Handle);
return 0;
}
@@ -92,11 +92,11 @@ namespace Ryujinx.HLE.HOS.Services.Vi
Dispose(true);
}
- protected virtual void Dispose(bool disposing)
+ protected virtual void Dispose(bool Disposing)
{
- if (disposing)
+ if (Disposing)
{
- _flinger.Dispose();
+ Flinger.Dispose();
}
}
}
diff --git a/Ryujinx.HLE/HOS/Services/Vi/IManagerDisplayService.cs b/Ryujinx.HLE/HOS/Services/Vi/IManagerDisplayService.cs
index 369c376f..a78f1812 100644
--- a/Ryujinx.HLE/HOS/Services/Vi/IManagerDisplayService.cs
+++ b/Ryujinx.HLE/HOS/Services/Vi/IManagerDisplayService.cs
@@ -6,13 +6,13 @@ namespace Ryujinx.HLE.HOS.Services.Vi
{
class IManagerDisplayService : IpcService
{
- private Dictionary<int, ServiceProcessRequest> _commands;
+ private Dictionary<int, ServiceProcessRequest> m_Commands;
- public override IReadOnlyDictionary<int, ServiceProcessRequest> Commands => _commands;
+ public override IReadOnlyDictionary<int, ServiceProcessRequest> Commands => m_Commands;
public IManagerDisplayService()
{
- _commands = new Dictionary<int, ServiceProcessRequest>
+ m_Commands = new Dictionary<int, ServiceProcessRequest>()
{
{ 2010, CreateManagedLayer },
{ 2011, DestroyManagedLayer },
@@ -21,30 +21,30 @@ namespace Ryujinx.HLE.HOS.Services.Vi
};
}
- public static long CreateManagedLayer(ServiceCtx context)
+ public static long CreateManagedLayer(ServiceCtx Context)
{
Logger.PrintStub(LogClass.ServiceVi, "Stubbed.");
- context.ResponseData.Write(0L); //LayerId
+ Context.ResponseData.Write(0L); //LayerId
return 0;
}
- public long DestroyManagedLayer(ServiceCtx context)
+ public long DestroyManagedLayer(ServiceCtx Context)
{
Logger.PrintStub(LogClass.ServiceVi, "Stubbed.");
return 0;
}
- public static long AddToLayerStack(ServiceCtx context)
+ public static long AddToLayerStack(ServiceCtx Context)
{
Logger.PrintStub(LogClass.ServiceVi, "Stubbed.");
return 0;
}
- public static long SetLayerVisibility(ServiceCtx context)
+ public static long SetLayerVisibility(ServiceCtx Context)
{
Logger.PrintStub(LogClass.ServiceVi, "Stubbed.");
diff --git a/Ryujinx.HLE/HOS/Services/Vi/IManagerRootService.cs b/Ryujinx.HLE/HOS/Services/Vi/IManagerRootService.cs
index 0f0a4f26..14b8fc3c 100644
--- a/Ryujinx.HLE/HOS/Services/Vi/IManagerRootService.cs
+++ b/Ryujinx.HLE/HOS/Services/Vi/IManagerRootService.cs
@@ -5,23 +5,23 @@ namespace Ryujinx.HLE.HOS.Services.Vi
{
class IManagerRootService : IpcService
{
- private Dictionary<int, ServiceProcessRequest> _commands;
+ private Dictionary<int, ServiceProcessRequest> m_Commands;
- public override IReadOnlyDictionary<int, ServiceProcessRequest> Commands => _commands;
+ public override IReadOnlyDictionary<int, ServiceProcessRequest> Commands => m_Commands;
public IManagerRootService()
{
- _commands = new Dictionary<int, ServiceProcessRequest>
+ m_Commands = new Dictionary<int, ServiceProcessRequest>()
{
{ 2, GetDisplayService }
};
}
- public long GetDisplayService(ServiceCtx context)
+ public long GetDisplayService(ServiceCtx Context)
{
- int serviceType = context.RequestData.ReadInt32();
+ int ServiceType = Context.RequestData.ReadInt32();
- MakeObject(context, new IApplicationDisplayService());
+ MakeObject(Context, new IApplicationDisplayService());
return 0;
}
diff --git a/Ryujinx.HLE/HOS/Services/Vi/ISystemDisplayService.cs b/Ryujinx.HLE/HOS/Services/Vi/ISystemDisplayService.cs
index 5266a253..4545579b 100644
--- a/Ryujinx.HLE/HOS/Services/Vi/ISystemDisplayService.cs
+++ b/Ryujinx.HLE/HOS/Services/Vi/ISystemDisplayService.cs
@@ -6,13 +6,13 @@ namespace Ryujinx.HLE.HOS.Services.Vi
{
class ISystemDisplayService : IpcService
{
- private Dictionary<int, ServiceProcessRequest> _commands;
+ private Dictionary<int, ServiceProcessRequest> m_Commands;
- public override IReadOnlyDictionary<int, ServiceProcessRequest> Commands => _commands;
+ public override IReadOnlyDictionary<int, ServiceProcessRequest> Commands => m_Commands;
public ISystemDisplayService()
{
- _commands = new Dictionary<int, ServiceProcessRequest>
+ m_Commands = new Dictionary<int, ServiceProcessRequest>()
{
{ 2205, SetLayerZ },
{ 2207, SetLayerVisibility },
@@ -20,27 +20,27 @@ namespace Ryujinx.HLE.HOS.Services.Vi
};
}
- public static long SetLayerZ(ServiceCtx context)
+ public static long SetLayerZ(ServiceCtx Context)
{
Logger.PrintStub(LogClass.ServiceVi, "Stubbed.");
return 0;
}
- public static long SetLayerVisibility(ServiceCtx context)
+ public static long SetLayerVisibility(ServiceCtx Context)
{
Logger.PrintStub(LogClass.ServiceVi, "Stubbed.");
return 0;
}
- public static long GetDisplayMode(ServiceCtx context)
+ public static long GetDisplayMode(ServiceCtx Context)
{
//TODO: De-hardcode resolution.
- context.ResponseData.Write(1280);
- context.ResponseData.Write(720);
- context.ResponseData.Write(60.0f);
- context.ResponseData.Write(0);
+ Context.ResponseData.Write(1280);
+ Context.ResponseData.Write(720);
+ Context.ResponseData.Write(60.0f);
+ Context.ResponseData.Write(0);
return 0;
}
diff --git a/Ryujinx.HLE/HOS/Services/Vi/ISystemRootService.cs b/Ryujinx.HLE/HOS/Services/Vi/ISystemRootService.cs
index 5e255ce5..d9b7c220 100644
--- a/Ryujinx.HLE/HOS/Services/Vi/ISystemRootService.cs
+++ b/Ryujinx.HLE/HOS/Services/Vi/ISystemRootService.cs
@@ -5,23 +5,23 @@ namespace Ryujinx.HLE.HOS.Services.Vi
{
class ISystemRootService : IpcService
{
- private Dictionary<int, ServiceProcessRequest> _commands;
+ private Dictionary<int, ServiceProcessRequest> m_Commands;
- public override IReadOnlyDictionary<int, ServiceProcessRequest> Commands => _commands;
+ public override IReadOnlyDictionary<int, ServiceProcessRequest> Commands => m_Commands;
public ISystemRootService()
{
- _commands = new Dictionary<int, ServiceProcessRequest>
+ m_Commands = new Dictionary<int, ServiceProcessRequest>()
{
{ 1, GetDisplayService }
};
}
- public long GetDisplayService(ServiceCtx context)
+ public long GetDisplayService(ServiceCtx Context)
{
- int serviceType = context.RequestData.ReadInt32();
+ int ServiceType = Context.RequestData.ReadInt32();
- MakeObject(context, new IApplicationDisplayService());
+ MakeObject(Context, new IApplicationDisplayService());
return 0;
}
diff --git a/Ryujinx.HLE/HOS/Services/Vi/NvFlinger.cs b/Ryujinx.HLE/HOS/Services/Vi/NvFlinger.cs
index 1b57b331..facfbe60 100644
--- a/Ryujinx.HLE/HOS/Services/Vi/NvFlinger.cs
+++ b/Ryujinx.HLE/HOS/Services/Vi/NvFlinger.cs
@@ -16,13 +16,13 @@ namespace Ryujinx.HLE.HOS.Services.Android
{
class NvFlinger : IDisposable
{
- private delegate long ServiceProcessParcel(ServiceCtx context, BinaryReader parcelReader);
+ private delegate long ServiceProcessParcel(ServiceCtx Context, BinaryReader ParcelReader);
- private Dictionary<(string, int), ServiceProcessParcel> _commands;
+ private Dictionary<(string, int), ServiceProcessParcel> Commands;
- private KEvent _binderEvent;
+ private KEvent BinderEvent;
- private IGalRenderer _renderer;
+ private IGalRenderer Renderer;
private const int BufferQueueCount = 0x40;
private const int BufferQueueMask = BufferQueueCount - 1;
@@ -62,15 +62,15 @@ namespace Ryujinx.HLE.HOS.Services.Android
public GbpBuffer Data;
}
- private BufferEntry[] _bufferQueue;
+ private BufferEntry[] BufferQueue;
- private AutoResetEvent _waitBufferFree;
+ private AutoResetEvent WaitBufferFree;
- private bool _disposed;
+ private bool Disposed;
- public NvFlinger(IGalRenderer renderer, KEvent binderEvent)
+ public NvFlinger(IGalRenderer Renderer, KEvent BinderEvent)
{
- _commands = new Dictionary<(string, int), ServiceProcessParcel>
+ Commands = new Dictionary<(string, int), ServiceProcessParcel>()
{
{ ("android.gui.IGraphicBufferProducer", 0x1), GbpRequestBuffer },
{ ("android.gui.IGraphicBufferProducer", 0x3), GbpDequeueBuffer },
@@ -83,307 +83,307 @@ namespace Ryujinx.HLE.HOS.Services.Android
{ ("android.gui.IGraphicBufferProducer", 0xe), GbpPreallocBuffer }
};
- _renderer = renderer;
- _binderEvent = binderEvent;
+ this.Renderer = Renderer;
+ this.BinderEvent = BinderEvent;
- _bufferQueue = new BufferEntry[0x40];
+ BufferQueue = new BufferEntry[0x40];
- _waitBufferFree = new AutoResetEvent(false);
+ WaitBufferFree = new AutoResetEvent(false);
}
- public long ProcessParcelRequest(ServiceCtx context, byte[] parcelData, int code)
+ public long ProcessParcelRequest(ServiceCtx Context, byte[] ParcelData, int Code)
{
- using (MemoryStream ms = new MemoryStream(parcelData))
+ using (MemoryStream MS = new MemoryStream(ParcelData))
{
- BinaryReader reader = new BinaryReader(ms);
+ BinaryReader Reader = new BinaryReader(MS);
- ms.Seek(4, SeekOrigin.Current);
+ MS.Seek(4, SeekOrigin.Current);
- int strSize = reader.ReadInt32();
+ int StrSize = Reader.ReadInt32();
- string interfaceName = Encoding.Unicode.GetString(reader.ReadBytes(strSize * 2));
+ string InterfaceName = Encoding.Unicode.GetString(Reader.ReadBytes(StrSize * 2));
- long remainder = ms.Position & 0xf;
+ long Remainder = MS.Position & 0xf;
- if (remainder != 0)
+ if (Remainder != 0)
{
- ms.Seek(0x10 - remainder, SeekOrigin.Current);
+ MS.Seek(0x10 - Remainder, SeekOrigin.Current);
}
- ms.Seek(0x50, SeekOrigin.Begin);
+ MS.Seek(0x50, SeekOrigin.Begin);
- if (_commands.TryGetValue((interfaceName, code), out ServiceProcessParcel procReq))
+ if (Commands.TryGetValue((InterfaceName, Code), out ServiceProcessParcel ProcReq))
{
- Logger.PrintDebug(LogClass.ServiceVi, $"{interfaceName} {procReq.Method.Name}");
+ Logger.PrintDebug(LogClass.ServiceVi, $"{InterfaceName} {ProcReq.Method.Name}");
- return procReq(context, reader);
+ return ProcReq(Context, Reader);
}
else
{
- throw new NotImplementedException($"{interfaceName} {code}");
+ throw new NotImplementedException($"{InterfaceName} {Code}");
}
}
}
- private long GbpRequestBuffer(ServiceCtx context, BinaryReader parcelReader)
+ private long GbpRequestBuffer(ServiceCtx Context, BinaryReader ParcelReader)
{
- int slot = parcelReader.ReadInt32();
+ int Slot = ParcelReader.ReadInt32();
- using (MemoryStream ms = new MemoryStream())
+ using (MemoryStream MS = new MemoryStream())
{
- BinaryWriter writer = new BinaryWriter(ms);
+ BinaryWriter Writer = new BinaryWriter(MS);
- BufferEntry entry = _bufferQueue[slot];
+ BufferEntry Entry = BufferQueue[Slot];
- int bufferCount = 1; //?
- long bufferSize = entry.Data.Size;
+ int BufferCount = 1; //?
+ long BufferSize = Entry.Data.Size;
- writer.Write(bufferCount);
- writer.Write(bufferSize);
+ Writer.Write(BufferCount);
+ Writer.Write(BufferSize);
- entry.Data.Write(writer);
+ Entry.Data.Write(Writer);
- writer.Write(0);
+ Writer.Write(0);
- return MakeReplyParcel(context, ms.ToArray());
+ return MakeReplyParcel(Context, MS.ToArray());
}
}
- private long GbpDequeueBuffer(ServiceCtx context, BinaryReader parcelReader)
+ private long GbpDequeueBuffer(ServiceCtx Context, BinaryReader ParcelReader)
{
//TODO: Errors.
- int format = parcelReader.ReadInt32();
- int width = parcelReader.ReadInt32();
- int height = parcelReader.ReadInt32();
- int getTimestamps = parcelReader.ReadInt32();
- int usage = parcelReader.ReadInt32();
+ int Format = ParcelReader.ReadInt32();
+ int Width = ParcelReader.ReadInt32();
+ int Height = ParcelReader.ReadInt32();
+ int GetTimestamps = ParcelReader.ReadInt32();
+ int Usage = ParcelReader.ReadInt32();
- int slot = GetFreeSlotBlocking(width, height);
+ int Slot = GetFreeSlotBlocking(Width, Height);
- return MakeReplyParcel(context, slot, 1, 0x24, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
+ return MakeReplyParcel(Context, Slot, 1, 0x24, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
}
- private long GbpQueueBuffer(ServiceCtx context, BinaryReader parcelReader)
+ private long GbpQueueBuffer(ServiceCtx Context, BinaryReader ParcelReader)
{
- context.Device.Statistics.RecordGameFrameTime();
+ Context.Device.Statistics.RecordGameFrameTime();
//TODO: Errors.
- int slot = parcelReader.ReadInt32();
- int unknown4 = parcelReader.ReadInt32();
- int unknown8 = parcelReader.ReadInt32();
- int unknownC = parcelReader.ReadInt32();
- int timestamp = parcelReader.ReadInt32();
- int isAutoTimestamp = parcelReader.ReadInt32();
- int cropTop = parcelReader.ReadInt32();
- int cropLeft = parcelReader.ReadInt32();
- int cropRight = parcelReader.ReadInt32();
- int cropBottom = parcelReader.ReadInt32();
- int scalingMode = parcelReader.ReadInt32();
- int transform = parcelReader.ReadInt32();
- int stickyTransform = parcelReader.ReadInt32();
- int unknown34 = parcelReader.ReadInt32();
- int unknown38 = parcelReader.ReadInt32();
- int isFenceValid = parcelReader.ReadInt32();
- int fence0Id = parcelReader.ReadInt32();
- int fence0Value = parcelReader.ReadInt32();
- int fence1Id = parcelReader.ReadInt32();
- int fence1Value = parcelReader.ReadInt32();
-
- _bufferQueue[slot].Transform = (HalTransform)transform;
-
- _bufferQueue[slot].Crop.Top = cropTop;
- _bufferQueue[slot].Crop.Left = cropLeft;
- _bufferQueue[slot].Crop.Right = cropRight;
- _bufferQueue[slot].Crop.Bottom = cropBottom;
-
- _bufferQueue[slot].State = BufferState.Queued;
-
- SendFrameBuffer(context, slot);
-
- if (context.Device.EnableDeviceVsync)
+ int Slot = ParcelReader.ReadInt32();
+ int Unknown4 = ParcelReader.ReadInt32();
+ int Unknown8 = ParcelReader.ReadInt32();
+ int Unknownc = ParcelReader.ReadInt32();
+ int Timestamp = ParcelReader.ReadInt32();
+ int IsAutoTimestamp = ParcelReader.ReadInt32();
+ int CropTop = ParcelReader.ReadInt32();
+ int CropLeft = ParcelReader.ReadInt32();
+ int CropRight = ParcelReader.ReadInt32();
+ int CropBottom = ParcelReader.ReadInt32();
+ int ScalingMode = ParcelReader.ReadInt32();
+ int Transform = ParcelReader.ReadInt32();
+ int StickyTransform = ParcelReader.ReadInt32();
+ int Unknown34 = ParcelReader.ReadInt32();
+ int Unknown38 = ParcelReader.ReadInt32();
+ int IsFenceValid = ParcelReader.ReadInt32();
+ int Fence0Id = ParcelReader.ReadInt32();
+ int Fence0Value = ParcelReader.ReadInt32();
+ int Fence1Id = ParcelReader.ReadInt32();
+ int Fence1Value = ParcelReader.ReadInt32();
+
+ BufferQueue[Slot].Transform = (HalTransform)Transform;
+
+ BufferQueue[Slot].Crop.Top = CropTop;
+ BufferQueue[Slot].Crop.Left = CropLeft;
+ BufferQueue[Slot].Crop.Right = CropRight;
+ BufferQueue[Slot].Crop.Bottom = CropBottom;
+
+ BufferQueue[Slot].State = BufferState.Queued;
+
+ SendFrameBuffer(Context, Slot);
+
+ if (Context.Device.EnableDeviceVsync)
{
- context.Device.VsyncEvent.WaitOne();
+ Context.Device.VsyncEvent.WaitOne();
}
- return MakeReplyParcel(context, 1280, 720, 0, 0, 0);
+ return MakeReplyParcel(Context, 1280, 720, 0, 0, 0);
}
- private long GbpDetachBuffer(ServiceCtx context, BinaryReader parcelReader)
+ private long GbpDetachBuffer(ServiceCtx Context, BinaryReader ParcelReader)
{
- return MakeReplyParcel(context, 0);
+ return MakeReplyParcel(Context, 0);
}
- private long GbpCancelBuffer(ServiceCtx context, BinaryReader parcelReader)
+ private long GbpCancelBuffer(ServiceCtx Context, BinaryReader ParcelReader)
{
//TODO: Errors.
- int slot = parcelReader.ReadInt32();
+ int Slot = ParcelReader.ReadInt32();
- _bufferQueue[slot].State = BufferState.Free;
+ BufferQueue[Slot].State = BufferState.Free;
- _waitBufferFree.Set();
+ WaitBufferFree.Set();
- return MakeReplyParcel(context, 0);
+ return MakeReplyParcel(Context, 0);
}
- private long GbpQuery(ServiceCtx context, BinaryReader parcelReader)
+ private long GbpQuery(ServiceCtx Context, BinaryReader ParcelReader)
{
- return MakeReplyParcel(context, 0, 0);
+ return MakeReplyParcel(Context, 0, 0);
}
- private long GbpConnect(ServiceCtx context, BinaryReader parcelReader)
+ private long GbpConnect(ServiceCtx Context, BinaryReader ParcelReader)
{
- return MakeReplyParcel(context, 1280, 720, 0, 0, 0);
+ return MakeReplyParcel(Context, 1280, 720, 0, 0, 0);
}
- private long GbpDisconnect(ServiceCtx context, BinaryReader parcelReader)
+ private long GbpDisconnect(ServiceCtx Context, BinaryReader ParcelReader)
{
- return MakeReplyParcel(context, 0);
+ return MakeReplyParcel(Context, 0);
}
- private long GbpPreallocBuffer(ServiceCtx context, BinaryReader parcelReader)
+ private long GbpPreallocBuffer(ServiceCtx Context, BinaryReader ParcelReader)
{
- int slot = parcelReader.ReadInt32();
+ int Slot = ParcelReader.ReadInt32();
- int bufferCount = parcelReader.ReadInt32();
+ int BufferCount = ParcelReader.ReadInt32();
- if (bufferCount > 0)
+ if (BufferCount > 0)
{
- long bufferSize = parcelReader.ReadInt64();
+ long BufferSize = ParcelReader.ReadInt64();
- _bufferQueue[slot].State = BufferState.Free;
+ BufferQueue[Slot].State = BufferState.Free;
- _bufferQueue[slot].Data = new GbpBuffer(parcelReader);
+ BufferQueue[Slot].Data = new GbpBuffer(ParcelReader);
}
- return MakeReplyParcel(context, 0);
+ return MakeReplyParcel(Context, 0);
}
- private long MakeReplyParcel(ServiceCtx context, params int[] ints)
+ private long MakeReplyParcel(ServiceCtx Context, params int[] Ints)
{
- using (MemoryStream ms = new MemoryStream())
+ using (MemoryStream MS = new MemoryStream())
{
- BinaryWriter writer = new BinaryWriter(ms);
+ BinaryWriter Writer = new BinaryWriter(MS);
- foreach (int Int in ints)
+ foreach (int Int in Ints)
{
- writer.Write(Int);
+ Writer.Write(Int);
}
- return MakeReplyParcel(context, ms.ToArray());
+ return MakeReplyParcel(Context, MS.ToArray());
}
}
- private long MakeReplyParcel(ServiceCtx context, byte[] data)
+ private long MakeReplyParcel(ServiceCtx Context, byte[] Data)
{
- (long replyPos, long replySize) = context.Request.GetBufferType0x22();
+ (long ReplyPos, long ReplySize) = Context.Request.GetBufferType0x22();
- byte[] reply = MakeParcel(data, new byte[0]);
+ byte[] Reply = MakeParcel(Data, new byte[0]);
- context.Memory.WriteBytes(replyPos, reply);
+ Context.Memory.WriteBytes(ReplyPos, Reply);
return 0;
}
- private void SendFrameBuffer(ServiceCtx context, int slot)
+ private void SendFrameBuffer(ServiceCtx Context, int Slot)
{
- int fbWidth = _bufferQueue[slot].Data.Width;
- int fbHeight = _bufferQueue[slot].Data.Height;
+ int FbWidth = BufferQueue[Slot].Data.Width;
+ int FbHeight = BufferQueue[Slot].Data.Height;
- int nvMapHandle = BitConverter.ToInt32(_bufferQueue[slot].Data.RawData, 0x4c);
- int bufferOffset = BitConverter.ToInt32(_bufferQueue[slot].Data.RawData, 0x50);
+ int NvMapHandle = BitConverter.ToInt32(BufferQueue[Slot].Data.RawData, 0x4c);
+ int BufferOffset = BitConverter.ToInt32(BufferQueue[Slot].Data.RawData, 0x50);
- NvMapHandle map = NvMapIoctl.GetNvMap(context, nvMapHandle);
+ NvMapHandle Map = NvMapIoctl.GetNvMap(Context, NvMapHandle);;
- long fbAddr = map.Address + bufferOffset;
+ long FbAddr = Map.Address + BufferOffset;
- _bufferQueue[slot].State = BufferState.Acquired;
+ BufferQueue[Slot].State = BufferState.Acquired;
- Rect crop = _bufferQueue[slot].Crop;
+ Rect Crop = BufferQueue[Slot].Crop;
- bool flipX = _bufferQueue[slot].Transform.HasFlag(HalTransform.FlipX);
- bool flipY = _bufferQueue[slot].Transform.HasFlag(HalTransform.FlipY);
+ bool FlipX = BufferQueue[Slot].Transform.HasFlag(HalTransform.FlipX);
+ bool FlipY = BufferQueue[Slot].Transform.HasFlag(HalTransform.FlipY);
//Note: Rotation is being ignored.
- int top = crop.Top;
- int left = crop.Left;
- int right = crop.Right;
- int bottom = crop.Bottom;
+ int Top = Crop.Top;
+ int Left = Crop.Left;
+ int Right = Crop.Right;
+ int Bottom = Crop.Bottom;
- NvGpuVmm vmm = NvGpuASIoctl.GetASCtx(context).Vmm;
+ NvGpuVmm Vmm = NvGpuASIoctl.GetASCtx(Context).Vmm;
- _renderer.QueueAction(() =>
+ Renderer.QueueAction(() =>
{
- if (!_renderer.Texture.TryGetImage(fbAddr, out GalImage image))
+ if (!Renderer.Texture.TryGetImage(FbAddr, out GalImage Image))
{
- image = new GalImage(
- fbWidth,
- fbHeight, 1, 16,
+ Image = new GalImage(
+ FbWidth,
+ FbHeight, 1, 16,
GalMemoryLayout.BlockLinear,
GalImageFormat.RGBA8 | GalImageFormat.Unorm);
}
- context.Device.Gpu.ResourceManager.ClearPbCache();
- context.Device.Gpu.ResourceManager.SendTexture(vmm, fbAddr, image);
+ Context.Device.Gpu.ResourceManager.ClearPbCache();
+ Context.Device.Gpu.ResourceManager.SendTexture(Vmm, FbAddr, Image);
- _renderer.RenderTarget.SetTransform(flipX, flipY, top, left, right, bottom);
- _renderer.RenderTarget.Present(fbAddr);
+ Renderer.RenderTarget.SetTransform(FlipX, FlipY, Top, Left, Right, Bottom);
+ Renderer.RenderTarget.Present(FbAddr);
- ReleaseBuffer(slot);
+ ReleaseBuffer(Slot);
});
}
- private void ReleaseBuffer(int slot)
+ private void ReleaseBuffer(int Slot)
{
- _bufferQueue[slot].State = BufferState.Free;
+ BufferQueue[Slot].State = BufferState.Free;
- _binderEvent.ReadableEvent.Signal();
+ BinderEvent.ReadableEvent.Signal();
- _waitBufferFree.Set();
+ WaitBufferFree.Set();
}
- private int GetFreeSlotBlocking(int width, int height)
+ private int GetFreeSlotBlocking(int Width, int Height)
{
- int slot;
+ int Slot;
do
{
- if ((slot = GetFreeSlot(width, height)) != -1)
+ if ((Slot = GetFreeSlot(Width, Height)) != -1)
{
break;
}
- if (_disposed)
+ if (Disposed)
{
break;
}
- _waitBufferFree.WaitOne();
+ WaitBufferFree.WaitOne();
}
- while (!_disposed);
+ while (!Disposed);
- return slot;
+ return Slot;
}
- private int GetFreeSlot(int width, int height)
+ private int GetFreeSlot(int Width, int Height)
{
- lock (_bufferQueue)
+ lock (BufferQueue)
{
- for (int slot = 0; slot < _bufferQueue.Length; slot++)
+ for (int Slot = 0; Slot < BufferQueue.Length; Slot++)
{
- if (_bufferQueue[slot].State != BufferState.Free)
+ if (BufferQueue[Slot].State != BufferState.Free)
{
continue;
}
- GbpBuffer data = _bufferQueue[slot].Data;
+ GbpBuffer Data = BufferQueue[Slot].Data;
- if (data.Width == width &&
- data.Height == height)
+ if (Data.Width == Width &&
+ Data.Height == Height)
{
- _bufferQueue[slot].State = BufferState.Dequeued;
+ BufferQueue[Slot].State = BufferState.Dequeued;
- return slot;
+ return Slot;
}
}
}
@@ -396,14 +396,14 @@ namespace Ryujinx.HLE.HOS.Services.Android
Dispose(true);
}
- protected virtual void Dispose(bool disposing)
+ protected virtual void Dispose(bool Disposing)
{
- if (disposing && !_disposed)
+ if (Disposing && !Disposed)
{
- _disposed = true;
+ Disposed = true;
- _waitBufferFree.Set();
- _waitBufferFree.Dispose();
+ WaitBufferFree.Set();
+ WaitBufferFree.Dispose();
}
}
}
diff --git a/Ryujinx.HLE/HOS/Services/Vi/Parcel.cs b/Ryujinx.HLE/HOS/Services/Vi/Parcel.cs
index 63c5a82f..bb842795 100644
--- a/Ryujinx.HLE/HOS/Services/Vi/Parcel.cs
+++ b/Ryujinx.HLE/HOS/Services/Vi/Parcel.cs
@@ -5,53 +5,53 @@ namespace Ryujinx.HLE.HOS.Services.Android
{
static class Parcel
{
- public static byte[] GetParcelData(byte[] parcel)
+ public static byte[] GetParcelData(byte[] Parcel)
{
- if (parcel == null)
+ if (Parcel == null)
{
- throw new ArgumentNullException(nameof(parcel));
+ throw new ArgumentNullException(nameof(Parcel));
}
- using (MemoryStream ms = new MemoryStream(parcel))
+ using (MemoryStream MS = new MemoryStream(Parcel))
{
- BinaryReader reader = new BinaryReader(ms);
+ BinaryReader Reader = new BinaryReader(MS);
- int dataSize = reader.ReadInt32();
- int dataOffset = reader.ReadInt32();
- int objsSize = reader.ReadInt32();
- int objsOffset = reader.ReadInt32();
+ int DataSize = Reader.ReadInt32();
+ int DataOffset = Reader.ReadInt32();
+ int ObjsSize = Reader.ReadInt32();
+ int ObjsOffset = Reader.ReadInt32();
- ms.Seek(dataOffset - 0x10, SeekOrigin.Current);
+ MS.Seek(DataOffset - 0x10, SeekOrigin.Current);
- return reader.ReadBytes(dataSize);
+ return Reader.ReadBytes(DataSize);
}
}
- public static byte[] MakeParcel(byte[] data, byte[] objs)
+ public static byte[] MakeParcel(byte[] Data, byte[] Objs)
{
- if (data == null)
+ if (Data == null)
{
- throw new ArgumentNullException(nameof(data));
+ throw new ArgumentNullException(nameof(Data));
}
- if (objs == null)
+ if (Objs == null)
{
- throw new ArgumentNullException(nameof(objs));
+ throw new ArgumentNullException(nameof(Objs));
}
- using (MemoryStream ms = new MemoryStream())
+ using (MemoryStream MS = new MemoryStream())
{
- BinaryWriter writer = new BinaryWriter(ms);
+ BinaryWriter Writer = new BinaryWriter(MS);
- writer.Write(data.Length);
- writer.Write(0x10);
- writer.Write(objs.Length);
- writer.Write(data.Length + 0x10);
+ Writer.Write(Data.Length);
+ Writer.Write(0x10);
+ Writer.Write(Objs.Length);
+ Writer.Write(Data.Length + 0x10);
- writer.Write(data);
- writer.Write(objs);
+ Writer.Write(Data);
+ Writer.Write(Objs);
- return ms.ToArray();
+ return MS.ToArray();
}
}
}