aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.HLE/HOS/Services/Nv/INvDrvServices.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Ryujinx.HLE/HOS/Services/Nv/INvDrvServices.cs')
-rw-r--r--Ryujinx.HLE/HOS/Services/Nv/INvDrvServices.cs18
1 files changed, 15 insertions, 3 deletions
diff --git a/Ryujinx.HLE/HOS/Services/Nv/INvDrvServices.cs b/Ryujinx.HLE/HOS/Services/Nv/INvDrvServices.cs
index a227d892..80a2e4b7 100644
--- a/Ryujinx.HLE/HOS/Services/Nv/INvDrvServices.cs
+++ b/Ryujinx.HLE/HOS/Services/Nv/INvDrvServices.cs
@@ -264,7 +264,7 @@ namespace Ryujinx.HLE.HOS.Services.Nv
errorCode = ConvertInternalErrorCode(internalResult);
- if (errorCode == NvResult.Success && (ioctlCommand.DirectionValue & NvIoctl.Direction.Write) != 0)
+ if ((ioctlCommand.DirectionValue & NvIoctl.Direction.Write) != 0)
{
context.Memory.WriteBytes(context.Request.GetBufferType0x22(0).Position, arguments.ToArray());
}
@@ -452,7 +452,7 @@ namespace Ryujinx.HLE.HOS.Services.Nv
errorCode = ConvertInternalErrorCode(internalResult);
- if (errorCode == NvResult.Success && (ioctlCommand.DirectionValue & NvIoctl.Direction.Write) != 0)
+ if ((ioctlCommand.DirectionValue & NvIoctl.Direction.Write) != 0)
{
context.Memory.WriteBytes(context.Request.GetBufferType0x22(0).Position, arguments.ToArray());
}
@@ -497,7 +497,7 @@ namespace Ryujinx.HLE.HOS.Services.Nv
errorCode = ConvertInternalErrorCode(internalResult);
- if (errorCode == NvResult.Success && (ioctlCommand.DirectionValue & NvIoctl.Direction.Write) != 0)
+ if ((ioctlCommand.DirectionValue & NvIoctl.Direction.Write) != 0)
{
context.Memory.WriteBytes(context.Request.GetBufferType0x22(0).Position, arguments.ToArray());
context.Memory.WriteBytes(inlineOutBufferPosition, inlineOutBuffer.ToArray());
@@ -519,5 +519,17 @@ namespace Ryujinx.HLE.HOS.Services.Nv
return ResultCode.Success;
}
+
+ public static void Destroy()
+ {
+ foreach (object entry in _deviceFileIdRegistry.Values)
+ {
+ NvDeviceFile deviceFile = (NvDeviceFile)entry;
+
+ deviceFile.Close();
+ }
+
+ _deviceFileIdRegistry.Clear();
+ }
}
} \ No newline at end of file