aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.HLE/HOS/Services/Nv
diff options
context:
space:
mode:
authorAlex Barney <thealexbarney@gmail.com>2019-07-01 21:39:22 -0500
committerAc_K <Acoustik666@gmail.com>2019-07-02 04:39:22 +0200
commitb2b736abc2569ab5d8199da666aef8d8394844a0 (patch)
tree88bcc2ae4fb0d4161c95df2cd7edb12388de922a /Ryujinx.HLE/HOS/Services/Nv
parent10c74182babaf8cf6bedaeffd64c3109df4ea816 (diff)
Misc cleanup (#708)
* Fix typos * Remove unneeded using statements * Enforce var style more * Remove redundant qualifiers * Fix some indentation * Disable naming warnings on files with external enum names * Fix build * Mass find & replace for comments with no spacing * Standardize todo capitalization and for/if spacing
Diffstat (limited to 'Ryujinx.HLE/HOS/Services/Nv')
-rw-r--r--Ryujinx.HLE/HOS/Services/Nv/INvDrvServices.cs4
-rw-r--r--Ryujinx.HLE/HOS/Services/Nv/NvGpuAS/NvGpuASCtx.cs8
-rw-r--r--Ryujinx.HLE/HOS/Services/Nv/NvGpuAS/NvGpuASIoctl.cs8
-rw-r--r--Ryujinx.HLE/HOS/Services/Nv/NvHostChannel/NvHostChannelIoctl.cs4
-rw-r--r--Ryujinx.HLE/HOS/Services/Nv/NvHostCtrl/NvHostCtrlIoctl.cs4
-rw-r--r--Ryujinx.HLE/HOS/Services/Nv/NvMap/NvMapIoctl.cs10
6 files changed, 19 insertions, 19 deletions
diff --git a/Ryujinx.HLE/HOS/Services/Nv/INvDrvServices.cs b/Ryujinx.HLE/HOS/Services/Nv/INvDrvServices.cs
index e69cc17f..dcfaef78 100644
--- a/Ryujinx.HLE/HOS/Services/Nv/INvDrvServices.cs
+++ b/Ryujinx.HLE/HOS/Services/Nv/INvDrvServices.cs
@@ -93,7 +93,7 @@ namespace Ryujinx.HLE.HOS.Services.Nv
throw new NotImplementedException($"{fdData.Name} {cmd:x4}");
}
- //TODO: Verify if the error codes needs to be translated.
+ // TODO: Verify if the error codes needs to be translated.
context.ResponseData.Write(result);
return 0;
@@ -127,7 +127,7 @@ namespace Ryujinx.HLE.HOS.Services.Nv
int fd = context.RequestData.ReadInt32();
int eventId = context.RequestData.ReadInt32();
- //TODO: Use Fd/EventId, different channels have different events.
+ // TODO: Use Fd/EventId, different channels have different events.
if (context.Process.HandleTable.GenerateHandle(_event.ReadableEvent, out int handle) != KernelResult.Success)
{
throw new InvalidOperationException("Out of handles!");
diff --git a/Ryujinx.HLE/HOS/Services/Nv/NvGpuAS/NvGpuASCtx.cs b/Ryujinx.HLE/HOS/Services/Nv/NvGpuAS/NvGpuASCtx.cs
index 67b80e33..e3cdf2f8 100644
--- a/Ryujinx.HLE/HOS/Services/Nv/NvGpuAS/NvGpuASCtx.cs
+++ b/Ryujinx.HLE/HOS/Services/Nv/NvGpuAS/NvGpuASCtx.cs
@@ -50,25 +50,25 @@ namespace Ryujinx.HLE.HOS.Services.Nv.NvGpuAS
{
long mapEnd = position + size;
- //Check if size is valid (0 is also not allowed).
+ // Check if size is valid (0 is also not allowed).
if ((ulong)mapEnd <= (ulong)position)
{
return false;
}
- //Check if address is page aligned.
+ // Check if address is page aligned.
if ((position & NvGpuVmm.PageMask) != 0)
{
return false;
}
- //Check if region is reserved.
+ // Check if region is reserved.
if (BinarySearch(_reservations, position) == null)
{
return false;
}
- //Check for overlap with already mapped buffers.
+ // Check for overlap with already mapped buffers.
Range map = BinarySearchLt(_maps, mapEnd);
if (map != null && map.End > (ulong)position)
diff --git a/Ryujinx.HLE/HOS/Services/Nv/NvGpuAS/NvGpuASIoctl.cs b/Ryujinx.HLE/HOS/Services/Nv/NvGpuAS/NvGpuASIoctl.cs
index 57728382..3b96ed6b 100644
--- a/Ryujinx.HLE/HOS/Services/Nv/NvGpuAS/NvGpuASIoctl.cs
+++ b/Ryujinx.HLE/HOS/Services/Nv/NvGpuAS/NvGpuASIoctl.cs
@@ -64,8 +64,8 @@ namespace Ryujinx.HLE.HOS.Services.Nv.NvGpuAS
lock (asCtx)
{
- //Note: When the fixed offset flag is not set,
- //the Offset field holds the alignment size instead.
+ // Note: When the fixed offset flag is not set,
+ // the Offset field holds the alignment size instead.
if ((args.Flags & FlagFixedOffset) != 0)
{
args.Offset = asCtx.Vmm.ReserveFixed(args.Offset, (long)size);
@@ -218,8 +218,8 @@ namespace Ryujinx.HLE.HOS.Services.Nv.NvGpuAS
lock (asCtx)
{
- //Note: When the fixed offset flag is not set,
- //the Offset field holds the alignment size instead.
+ // Note: When the fixed offset flag is not set,
+ // the Offset field holds the alignment size instead.
bool vaAllocated = (args.Flags & FlagFixedOffset) == 0;
if (!vaAllocated)
diff --git a/Ryujinx.HLE/HOS/Services/Nv/NvHostChannel/NvHostChannelIoctl.cs b/Ryujinx.HLE/HOS/Services/Nv/NvHostChannel/NvHostChannelIoctl.cs
index a13f0fcb..c5f29636 100644
--- a/Ryujinx.HLE/HOS/Services/Nv/NvHostChannel/NvHostChannelIoctl.cs
+++ b/Ryujinx.HLE/HOS/Services/Nv/NvHostChannel/NvHostChannelIoctl.cs
@@ -69,14 +69,14 @@ namespace Ryujinx.HLE.HOS.Services.Nv.NvHostChannel
context.Device.Gpu.PushCommandBuffer(vmm, cmdBufData);
}
- //TODO: Relocation, waitchecks, etc.
+ // TODO: Relocation, waitchecks, etc.
return NvResult.Success;
}
private static int GetSyncpoint(ServiceCtx context)
{
- //TODO
+ // TODO
long inputPosition = context.Request.GetBufferType0x21().Position;
long outputPosition = context.Request.GetBufferType0x22().Position;
diff --git a/Ryujinx.HLE/HOS/Services/Nv/NvHostCtrl/NvHostCtrlIoctl.cs b/Ryujinx.HLE/HOS/Services/Nv/NvHostCtrl/NvHostCtrlIoctl.cs
index e05ea77c..35f1a949 100644
--- a/Ryujinx.HLE/HOS/Services/Nv/NvHostCtrl/NvHostCtrlIoctl.cs
+++ b/Ryujinx.HLE/HOS/Services/Nv/NvHostCtrl/NvHostCtrlIoctl.cs
@@ -208,8 +208,8 @@ namespace Ryujinx.HLE.HOS.Services.Nv.NvHostCtrl
{
syncpt.AddWaiter(args.Thresh, waitEvent);
- //Note: Negative (> INT_MAX) timeouts aren't valid on .NET,
- //in this case we just use the maximum timeout possible.
+ // Note: Negative (> INT_MAX) timeouts aren't valid on .NET,
+ // in this case we just use the maximum timeout possible.
int timeout = args.Timeout;
if (timeout < -1)
diff --git a/Ryujinx.HLE/HOS/Services/Nv/NvMap/NvMapIoctl.cs b/Ryujinx.HLE/HOS/Services/Nv/NvMap/NvMapIoctl.cs
index b1ae8307..72286662 100644
--- a/Ryujinx.HLE/HOS/Services/Nv/NvMap/NvMapIoctl.cs
+++ b/Ryujinx.HLE/HOS/Services/Nv/NvMap/NvMapIoctl.cs
@@ -128,9 +128,9 @@ namespace Ryujinx.HLE.HOS.Services.Nv.NvMap
if (address == 0)
{
- //When the address is zero, we need to allocate
- //our own backing memory for the NvMap.
- //TODO: Is this allocation inside the transfer memory?
+ // When the address is zero, we need to allocate
+ // our own backing memory for the NvMap.
+ // TODO: Is this allocation inside the transfer memory?
result = NvResult.OutOfMemory;
}
@@ -208,8 +208,8 @@ namespace Ryujinx.HLE.HOS.Services.Nv.NvMap
case NvMapHandleParam.Kind: args.Result = map.Kind; break;
case NvMapHandleParam.Compr: args.Result = 0; break;
- //Note: Base is not supported and returns an error.
- //Any other value also returns an error.
+ // Note: Base is not supported and returns an error.
+ // Any other value also returns an error.
default: return NvResult.InvalidInput;
}