diff --git a/Ryujinx.HLE/HOS/Services/Android/NvFlinger.cs b/Ryujinx.HLE/HOS/Services/Android/NvFlinger.cs index fec9d7d0b6..63df78e5e5 100644 --- a/Ryujinx.HLE/HOS/Services/Android/NvFlinger.cs +++ b/Ryujinx.HLE/HOS/Services/Android/NvFlinger.cs @@ -290,7 +290,7 @@ namespace Ryujinx.HLE.HOS.Services.Android int bufferOffset = _bufferQueue[slot].Data.Buffer.Surfaces[0].Offset; - NvMapHandle map = NvMapFileDevice.GetMapFromHandle(context.Process, nvMapHandle); + NvMapHandle map = NvMapDeviceFile.GetMapFromHandle(context.Process, nvMapHandle); long fbAddr = map.Address + bufferOffset; @@ -312,7 +312,7 @@ namespace Ryujinx.HLE.HOS.Services.Android int right = crop.Right; int bottom = crop.Bottom; - NvGpuVmm vmm = NvHostAsGpuFileDevice.GetAddressSpaceContext(context.Process).Vmm; + NvGpuVmm vmm = NvHostAsGpuDeviceFile.GetAddressSpaceContext(context.Process).Vmm; _renderer.QueueAction(() => { diff --git a/Ryujinx.HLE/HOS/Services/Nv/INvDrvServices.cs b/Ryujinx.HLE/HOS/Services/Nv/INvDrvServices.cs index 4d09908066..a71e1d3e0c 100644 --- a/Ryujinx.HLE/HOS/Services/Nv/INvDrvServices.cs +++ b/Ryujinx.HLE/HOS/Services/Nv/INvDrvServices.cs @@ -24,22 +24,22 @@ namespace Ryujinx.HLE.HOS.Services.Nv [Service("nvdrv:t")] class INvDrvServices : IpcService { - private static Dictionary _fileDeviceRegistry = + private static Dictionary _deviceFileRegistry = new Dictionary() { - { "/dev/nvmap", typeof(NvMapFileDevice) }, - { "/dev/nvhost-ctrl", typeof(NvHostCtrlFileDevice) }, - { "/dev/nvhost-ctrl-gpu", typeof(NvHostCtrlGpuFileDevice) }, - { "/dev/nvhost-as-gpu", typeof(NvHostAsGpuFileDevice) }, - { "/dev/nvhost-gpu", typeof(NvHostGpuFileDevice) }, - //{ "/dev/nvhost-msenc", typeof(NvHostChannelFileDevice) }, - { "/dev/nvhost-nvdec", typeof(NvHostChannelFileDevice) }, - //{ "/dev/nvhost-nvjpg", typeof(NvHostChannelFileDevice) }, - { "/dev/nvhost-vic", typeof(NvHostChannelFileDevice) }, - //{ "/dev/nvhost-display", typeof(NvHostChannelFileDevice) }, + { "/dev/nvmap", typeof(NvMapDeviceFile) }, + { "/dev/nvhost-ctrl", typeof(NvHostCtrlDeviceFile) }, + { "/dev/nvhost-ctrl-gpu", typeof(NvHostCtrlGpuDeviceFile) }, + { "/dev/nvhost-as-gpu", typeof(NvHostAsGpuDeviceFile) }, + { "/dev/nvhost-gpu", typeof(NvHostGpuDeviceFile) }, + //{ "/dev/nvhost-msenc", typeof(NvHostChannelDeviceFile) }, + { "/dev/nvhost-nvdec", typeof(NvHostChannelDeviceFile) }, + //{ "/dev/nvhost-nvjpg", typeof(NvHostChannelDeviceFile) }, + { "/dev/nvhost-vic", typeof(NvHostChannelDeviceFile) }, + //{ "/dev/nvhost-display", typeof(NvHostChannelDeviceFile) }, }; - private static IdDictionary _fileDeviceIdRegistry = new IdDictionary(); + private static IdDictionary _deviceFileIdRegistry = new IdDictionary(); private KProcess _owner; public INvDrvServices(ServiceCtx context) @@ -51,13 +51,13 @@ namespace Ryujinx.HLE.HOS.Services.Nv { if (context.Process == _owner) { - if (_fileDeviceRegistry.TryGetValue(path, out Type fileDeviceClass)) + if (_deviceFileRegistry.TryGetValue(path, out Type deviceFileClass)) { - ConstructorInfo constructor = fileDeviceClass.GetConstructor(new Type[] { typeof(ServiceCtx) }); + ConstructorInfo constructor = deviceFileClass.GetConstructor(new Type[] { typeof(ServiceCtx) }); - NvFileDevice fileDevice = (NvFileDevice)constructor.Invoke(new object[] { context }); + NvDeviceFile deviceFile = (NvDeviceFile)constructor.Invoke(new object[] { context }); - return _fileDeviceIdRegistry.Add(fileDevice); + return _deviceFileIdRegistry.Add(deviceFile); } else { @@ -119,25 +119,25 @@ namespace Ryujinx.HLE.HOS.Services.Nv return NvResult.Success; } - private NvResult GetFileDeviceFromFd(int fd, out NvFileDevice fileDevice) + private NvResult GetDeviceFileFromFd(int fd, out NvDeviceFile deviceFile) { - fileDevice = null; + deviceFile = null; if (fd < 0) { return NvResult.InvalidParameter; } - fileDevice = _fileDeviceIdRegistry.GetData(fd); + deviceFile = _deviceFileIdRegistry.GetData(fd); - if (fileDevice == null) + if (deviceFile == null) { Logger.PrintWarning(LogClass.ServiceNv, $"Invalid file descriptor {fd}"); return NvResult.NotImplemented; } - if (fileDevice.GetOwner().Pid != _owner.Pid) + if (deviceFile.GetOwner().Pid != _owner.Pid) { return NvResult.AccessDenied; } @@ -248,15 +248,15 @@ namespace Ryujinx.HLE.HOS.Services.Nv if (errorCode == NvResult.Success) { - errorCode = GetFileDeviceFromFd(fd, out NvFileDevice fileDevice); + errorCode = GetDeviceFileFromFd(fd, out NvDeviceFile deviceFile); if (errorCode == NvResult.Success) { - NvInternalResult internalResult = fileDevice.Ioctl(ioctlCommand, arguments); + NvInternalResult internalResult = deviceFile.Ioctl(ioctlCommand, arguments); if (internalResult == NvInternalResult.NotImplemented) { - throw new NvIoctlNotImplementedException(context, fileDevice, ioctlCommand); + throw new NvIoctlNotImplementedException(context, deviceFile, ioctlCommand); } errorCode = ConvertInternalErrorCode(internalResult); @@ -284,13 +284,13 @@ namespace Ryujinx.HLE.HOS.Services.Nv { int fd = context.RequestData.ReadInt32(); - errorCode = GetFileDeviceFromFd(fd, out NvFileDevice fileDevice); + errorCode = GetDeviceFileFromFd(fd, out NvDeviceFile deviceFile); if (errorCode == NvResult.Success) { - fileDevice.Close(); + deviceFile.Close(); - _fileDeviceIdRegistry.Delete(fd); + _deviceFileIdRegistry.Delete(fd); } } @@ -324,15 +324,15 @@ namespace Ryujinx.HLE.HOS.Services.Nv int fd = context.RequestData.ReadInt32(); uint eventId = context.RequestData.ReadUInt32(); - errorCode = GetFileDeviceFromFd(fd, out NvFileDevice fileDevice); + errorCode = GetDeviceFileFromFd(fd, out NvDeviceFile deviceFile); if (errorCode == NvResult.Success) { - NvInternalResult internalResult = fileDevice.QueryEvent(out int eventHandle, eventId); + NvInternalResult internalResult = deviceFile.QueryEvent(out int eventHandle, eventId); if (internalResult == NvInternalResult.NotImplemented) { - throw new NvQueryEventlNotImplementedException(context, fileDevice, eventId); + throw new NvQueryEventlNotImplementedException(context, deviceFile, eventId); } errorCode = ConvertInternalErrorCode(internalResult); @@ -361,13 +361,13 @@ namespace Ryujinx.HLE.HOS.Services.Nv uint argument = context.RequestData.ReadUInt32(); int sharedMemoryHandle = context.Request.HandleDesc.ToCopy[0]; - errorCode = GetFileDeviceFromFd(fd, out NvFileDevice fileDevice); + errorCode = GetDeviceFileFromFd(fd, out NvDeviceFile deviceFile); if (errorCode == NvResult.Success) { KSharedMemory sharedMemory = context.Process.HandleTable.GetObject(sharedMemoryHandle); - errorCode = ConvertInternalErrorCode(fileDevice.MapSharedMemory(sharedMemory, argument)); + errorCode = ConvertInternalErrorCode(deviceFile.MapSharedMemory(sharedMemory, argument)); } } @@ -432,15 +432,15 @@ namespace Ryujinx.HLE.HOS.Services.Nv if (errorCode == NvResult.Success) { - errorCode = GetFileDeviceFromFd(fd, out NvFileDevice fileDevice); + errorCode = GetDeviceFileFromFd(fd, out NvDeviceFile deviceFile); if (errorCode == NvResult.Success) { - NvInternalResult internalResult = fileDevice.Ioctl2(ioctlCommand, arguments, inlineInBuffer); + NvInternalResult internalResult = deviceFile.Ioctl2(ioctlCommand, arguments, inlineInBuffer); if (internalResult == NvInternalResult.NotImplemented) { - throw new NvIoctlNotImplementedException(context, fileDevice, ioctlCommand); + throw new NvIoctlNotImplementedException(context, deviceFile, ioctlCommand); } errorCode = ConvertInternalErrorCode(internalResult); @@ -477,15 +477,15 @@ namespace Ryujinx.HLE.HOS.Services.Nv if (errorCode == NvResult.Success) { - errorCode = GetFileDeviceFromFd(fd, out NvFileDevice fileDevice); + errorCode = GetDeviceFileFromFd(fd, out NvDeviceFile deviceFile); if (errorCode == NvResult.Success) { - NvInternalResult internalResult = fileDevice.Ioctl3(ioctlCommand, arguments, inlineOutBuffer); + NvInternalResult internalResult = deviceFile.Ioctl3(ioctlCommand, arguments, inlineOutBuffer); if (internalResult == NvInternalResult.NotImplemented) { - throw new NvIoctlNotImplementedException(context, fileDevice, ioctlCommand); + throw new NvIoctlNotImplementedException(context, deviceFile, ioctlCommand); } errorCode = ConvertInternalErrorCode(internalResult); diff --git a/Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvFileDevice.cs b/Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvDeviceFile.cs similarity index 97% rename from Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvFileDevice.cs rename to Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvDeviceFile.cs index 03108ca7b9..012e32b33d 100644 --- a/Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvFileDevice.cs +++ b/Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvDeviceFile.cs @@ -7,11 +7,11 @@ using System.Runtime.InteropServices; namespace Ryujinx.HLE.HOS.Services.Nv.NvDrvServices { - abstract class NvFileDevice + abstract class NvDeviceFile { protected KProcess _owner; - public NvFileDevice(ServiceCtx context) + public NvDeviceFile(ServiceCtx context) { _owner = context.Process; } diff --git a/Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvHostAsGpu/NvHostAsGpuFileDevice.cs b/Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvHostAsGpu/NvHostAsGpuDeviceFile.cs similarity index 97% rename from Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvHostAsGpu/NvHostAsGpuFileDevice.cs rename to Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvHostAsGpu/NvHostAsGpuDeviceFile.cs index 34fb1d4281..86aa591b90 100644 --- a/Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvHostAsGpu/NvHostAsGpuFileDevice.cs +++ b/Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvHostAsGpu/NvHostAsGpuDeviceFile.cs @@ -8,14 +8,14 @@ using System.Collections.Concurrent; namespace Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvHostAsGpu { - class NvHostAsGpuFileDevice : NvFileDevice + class NvHostAsGpuDeviceFile : NvDeviceFile { private const int FlagFixedOffset = 1; private const int FlagRemapSubRange = 0x100; private static ConcurrentDictionary _addressSpaceContextRegistry = new ConcurrentDictionary(); - public NvHostAsGpuFileDevice(ServiceCtx context) : base(context) + public NvHostAsGpuDeviceFile(ServiceCtx context) : base(context) { } @@ -175,7 +175,7 @@ namespace Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvHostAsGpu AddressSpaceContext addressSpaceContext = GetAddressSpaceContext(_owner); - NvMapHandle map = NvMapFileDevice.GetMapFromHandle(_owner, arguments.NvMapHandle, true); + NvMapHandle map = NvMapDeviceFile.GetMapFromHandle(_owner, arguments.NvMapHandle, true); if (map == null) { @@ -290,7 +290,7 @@ namespace Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvHostAsGpu { NvGpuVmm vmm = GetAddressSpaceContext(_owner).Vmm; - NvMapHandle map = NvMapFileDevice.GetMapFromHandle(_owner, arguments[index].NvMapHandle, true); + NvMapHandle map = NvMapDeviceFile.GetMapFromHandle(_owner, arguments[index].NvMapHandle, true); if (map == null) { diff --git a/Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvHostChannel/NvHostChannelFileDevice.cs b/Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvHostChannel/NvHostChannelDeviceFile.cs similarity index 95% rename from Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvHostChannel/NvHostChannelFileDevice.cs rename to Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvHostChannel/NvHostChannelDeviceFile.cs index 1e2060c0b6..4d9b4da330 100644 --- a/Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvHostChannel/NvHostChannelFileDevice.cs +++ b/Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvHostChannel/NvHostChannelDeviceFile.cs @@ -10,7 +10,7 @@ using System.Runtime.InteropServices; namespace Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvHostChannel { - class NvHostChannelFileDevice : NvFileDevice + class NvHostChannelDeviceFile : NvDeviceFile { private uint _timeout; private uint _submitTimeout; @@ -18,7 +18,7 @@ namespace Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvHostChannel private NvGpu _gpu; private MemoryManager _memory; - public NvHostChannelFileDevice(ServiceCtx context) : base(context) + public NvHostChannelDeviceFile(ServiceCtx context) : base(context) { _gpu = context.Device.Gpu; _memory = context.Memory; @@ -109,11 +109,11 @@ namespace Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvHostChannel int headerSize = Marshal.SizeOf(); SubmitArguments submitHeader = MemoryMarshal.Cast(arguments)[0]; Span commandBufferEntries = MemoryMarshal.Cast(arguments.Slice(headerSize)).Slice(0, submitHeader.CmdBufsCount); - NvGpuVmm vmm = NvHostAsGpuFileDevice.GetAddressSpaceContext(_owner).Vmm; + NvGpuVmm vmm = NvHostAsGpuDeviceFile.GetAddressSpaceContext(_owner).Vmm; foreach (CommandBuffer commandBufferEntry in commandBufferEntries) { - NvMapHandle map = NvMapFileDevice.GetMapFromHandle(_owner, commandBufferEntry.MemoryId); + NvMapHandle map = NvMapDeviceFile.GetMapFromHandle(_owner, commandBufferEntry.MemoryId); int[] cmdBufData = new int[commandBufferEntry.WordsCount]; @@ -160,11 +160,11 @@ namespace Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvHostChannel int headerSize = Marshal.SizeOf(); MapCommandBufferArguments commandBufferHeader = MemoryMarshal.Cast(arguments)[0]; Span commandBufferEntries = MemoryMarshal.Cast(arguments.Slice(headerSize)).Slice(0, commandBufferHeader.NumEntries); - NvGpuVmm vmm = NvHostAsGpuFileDevice.GetAddressSpaceContext(_owner).Vmm; + NvGpuVmm vmm = NvHostAsGpuDeviceFile.GetAddressSpaceContext(_owner).Vmm; foreach (ref CommandBufferHandle commandBufferEntry in commandBufferEntries) { - NvMapHandle map = NvMapFileDevice.GetMapFromHandle(_owner, commandBufferEntry.MapHandle); + NvMapHandle map = NvMapDeviceFile.GetMapFromHandle(_owner, commandBufferEntry.MapHandle); if (map == null) { @@ -192,13 +192,13 @@ namespace Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvHostChannel int headerSize = Marshal.SizeOf(); MapCommandBufferArguments commandBufferHeader = MemoryMarshal.Cast(arguments)[0]; Span commandBufferEntries = MemoryMarshal.Cast(arguments.Slice(headerSize)).Slice(0, commandBufferHeader.NumEntries); - NvGpuVmm vmm = NvHostAsGpuFileDevice.GetAddressSpaceContext(_owner).Vmm; + NvGpuVmm vmm = NvHostAsGpuDeviceFile.GetAddressSpaceContext(_owner).Vmm; // TODO foreach (ref CommandBufferHandle commandBufferEntry in commandBufferEntries) { - NvMapHandle map = NvMapFileDevice.GetMapFromHandle(_owner, commandBufferEntry.MapHandle); + NvMapHandle map = NvMapDeviceFile.GetMapFromHandle(_owner, commandBufferEntry.MapHandle); if (map == null) { @@ -330,7 +330,7 @@ namespace Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvHostChannel protected NvInternalResult SubmitGpfifo(ref SubmitGpfifoArguments header, Span entries) { - NvGpuVmm vmm = NvHostAsGpuFileDevice.GetAddressSpaceContext(_owner).Vmm; + NvGpuVmm vmm = NvHostAsGpuDeviceFile.GetAddressSpaceContext(_owner).Vmm; foreach (long entry in entries) { diff --git a/Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvHostChannel/NvHostGpuFileDevice.cs b/Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvHostChannel/NvHostGpuDeviceFile.cs similarity index 95% rename from Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvHostChannel/NvHostGpuFileDevice.cs rename to Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvHostChannel/NvHostGpuDeviceFile.cs index bbfd70b47c..8df115eb7e 100644 --- a/Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvHostChannel/NvHostGpuFileDevice.cs +++ b/Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvHostChannel/NvHostGpuDeviceFile.cs @@ -5,13 +5,13 @@ using System; namespace Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvHostChannel { - internal class NvHostGpuFileDevice : NvHostChannelFileDevice + internal class NvHostGpuDeviceFile : NvHostChannelDeviceFile { private KEvent _smExceptionBptIntReportEvent; private KEvent _smExceptionBptPauseReportEvent; private KEvent _errorNotifierEvent; - public NvHostGpuFileDevice(ServiceCtx context) : base(context) + public NvHostGpuDeviceFile(ServiceCtx context) : base(context) { _smExceptionBptIntReportEvent = new KEvent(context.Device.System); _smExceptionBptPauseReportEvent = new KEvent(context.Device.System); diff --git a/Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvHostCtrl/NvHostCtrlFileDevice.cs b/Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvHostCtrl/NvHostCtrlDeviceFile.cs similarity index 99% rename from Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvHostCtrl/NvHostCtrlFileDevice.cs rename to Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvHostCtrl/NvHostCtrlDeviceFile.cs index 012528fe70..54dab8583e 100644 --- a/Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvHostCtrl/NvHostCtrlFileDevice.cs +++ b/Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvHostCtrl/NvHostCtrlDeviceFile.cs @@ -11,7 +11,7 @@ using System.Threading; namespace Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvHostCtrl { - internal class NvHostCtrlFileDevice : NvFileDevice + internal class NvHostCtrlDeviceFile : NvDeviceFile { private const int EventsCount = 64; @@ -20,7 +20,7 @@ namespace Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvHostCtrl private NvHostEvent[] _events; private KEvent _dummyEvent; - public NvHostCtrlFileDevice(ServiceCtx context) : base(context) + public NvHostCtrlDeviceFile(ServiceCtx context) : base(context) { if (NxSettings.Settings.TryGetValue("nv!rmos_set_production_mode", out object productionModeSetting)) { diff --git a/Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvHostCtrlGpu/NvHostCtrlGpuFileDevice.cs b/Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvHostCtrlGpu/NvHostCtrlGpuDeviceFile.cs similarity index 98% rename from Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvHostCtrlGpu/NvHostCtrlGpuFileDevice.cs rename to Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvHostCtrlGpu/NvHostCtrlGpuDeviceFile.cs index b70419f63b..f55c9f90a5 100644 --- a/Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvHostCtrlGpu/NvHostCtrlGpuFileDevice.cs +++ b/Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvHostCtrlGpu/NvHostCtrlGpuDeviceFile.cs @@ -8,7 +8,7 @@ using System.Diagnostics; namespace Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvHostCtrlGpu { - class NvHostCtrlGpuFileDevice : NvFileDevice + class NvHostCtrlGpuDeviceFile : NvDeviceFile { private static Stopwatch _pTimer = new Stopwatch(); private static double _ticksToNs = (1.0 / Stopwatch.Frequency) * 1_000_000_000; @@ -16,13 +16,13 @@ namespace Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvHostCtrlGpu private KEvent _errorEvent; private KEvent _unknownEvent; - public NvHostCtrlGpuFileDevice(ServiceCtx context) : base(context) + public NvHostCtrlGpuDeviceFile(ServiceCtx context) : base(context) { _errorEvent = new KEvent(context.Device.System); _unknownEvent = new KEvent(context.Device.System); } - static NvHostCtrlGpuFileDevice() + static NvHostCtrlGpuDeviceFile() { _pTimer.Start(); } diff --git a/Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvMap/NvMapFileDevice.cs b/Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvMap/NvMapDeviceFile.cs similarity index 97% rename from Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvMap/NvMapFileDevice.cs rename to Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvMap/NvMapDeviceFile.cs index d59e298622..fa341a0e38 100644 --- a/Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvMap/NvMapFileDevice.cs +++ b/Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvMap/NvMapDeviceFile.cs @@ -7,13 +7,13 @@ using System.Collections.Concurrent; namespace Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvMap { - internal class NvMapFileDevice : NvFileDevice + internal class NvMapDeviceFile : NvDeviceFile { private const int FlagNotFreedYet = 1; private static ConcurrentDictionary _maps = new ConcurrentDictionary(); - public NvMapFileDevice(ServiceCtx context) : base(context) + public NvMapDeviceFile(ServiceCtx context) : base(context) { IdDictionary dict = _maps.GetOrAdd(_owner, (key) => new IdDictionary()); @@ -230,7 +230,7 @@ namespace Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvMap public override void Close() { - // TODO: refcount NvMapFileDevice instances and remove when closing + // TODO: refcount NvMapDeviceFile instances and remove when closing // _maps.TryRemove(GetOwner(), out _); } diff --git a/Ryujinx.HLE/HOS/Services/Nv/Types/NvIoctlNotImplementedException.cs b/Ryujinx.HLE/HOS/Services/Nv/Types/NvIoctlNotImplementedException.cs index 988913cd09..dcc28b1ceb 100644 --- a/Ryujinx.HLE/HOS/Services/Nv/Types/NvIoctlNotImplementedException.cs +++ b/Ryujinx.HLE/HOS/Services/Nv/Types/NvIoctlNotImplementedException.cs @@ -7,18 +7,18 @@ namespace Ryujinx.HLE.HOS.Services.Nv.Types class NvIoctlNotImplementedException : Exception { public ServiceCtx Context { get; } - public NvFileDevice FileDevice { get; } + public NvDeviceFile DeviceFile { get; } public NvIoctl Command { get; } - public NvIoctlNotImplementedException(ServiceCtx context, NvFileDevice fileDevice, NvIoctl command) - : this(context, fileDevice, command, "The ioctl is not implemented.") + public NvIoctlNotImplementedException(ServiceCtx context, NvDeviceFile deviceFile, NvIoctl command) + : this(context, deviceFile, command, "The ioctl is not implemented.") { } - public NvIoctlNotImplementedException(ServiceCtx context, NvFileDevice fileDevice, NvIoctl command, string message) + public NvIoctlNotImplementedException(ServiceCtx context, NvDeviceFile deviceFile, NvIoctl command, string message) : base(message) { Context = context; - FileDevice = fileDevice; + DeviceFile = deviceFile; Command = command; } @@ -37,7 +37,7 @@ namespace Ryujinx.HLE.HOS.Services.Nv.Types { StringBuilder sb = new StringBuilder(); - sb.AppendLine($"Device File: {FileDevice.GetType().Name}"); + sb.AppendLine($"Device File: {DeviceFile.GetType().Name}"); sb.AppendLine(); sb.AppendLine($"Ioctl (0x{Command.RawValue:x8})"); diff --git a/Ryujinx.HLE/HOS/Services/Nv/Types/NvQueryEventNotImplementedException.cs b/Ryujinx.HLE/HOS/Services/Nv/Types/NvQueryEventNotImplementedException.cs index 2af1574a6a..76eeba0e43 100644 --- a/Ryujinx.HLE/HOS/Services/Nv/Types/NvQueryEventNotImplementedException.cs +++ b/Ryujinx.HLE/HOS/Services/Nv/Types/NvQueryEventNotImplementedException.cs @@ -7,18 +7,18 @@ namespace Ryujinx.HLE.HOS.Services.Nv.Types class NvQueryEventlNotImplementedException : Exception { public ServiceCtx Context { get; } - public NvFileDevice FileDevice { get; } + public NvDeviceFile DeviceFile { get; } public uint EventId { get; } - public NvQueryEventlNotImplementedException(ServiceCtx context, NvFileDevice fileDevice, uint eventId) - : this(context, fileDevice, eventId, "The ioctl is not implemented.") + public NvQueryEventlNotImplementedException(ServiceCtx context, NvDeviceFile deviceFile, uint eventId) + : this(context, deviceFile, eventId, "This query event is not implemented.") { } - public NvQueryEventlNotImplementedException(ServiceCtx context, NvFileDevice fileDevice, uint eventId, string message) + public NvQueryEventlNotImplementedException(ServiceCtx context, NvDeviceFile deviceFile, uint eventId, string message) : base(message) { Context = context; - FileDevice = fileDevice; + DeviceFile = deviceFile; EventId = eventId; } @@ -37,7 +37,7 @@ namespace Ryujinx.HLE.HOS.Services.Nv.Types { StringBuilder sb = new StringBuilder(); - sb.AppendLine($"Device File: {FileDevice.GetType().Name}"); + sb.AppendLine($"Device File: {DeviceFile.GetType().Name}"); sb.AppendLine(); sb.AppendLine($"Event ID: (0x{EventId:x8})");