diff options
| author | Bruno Macabeus <macabeus@users.noreply.github.com> | 2021-01-01 14:03:33 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-01-01 19:03:33 -0300 |
| commit | b9fd7c8b23217c112dd80f76ff31da553cb6a1a1 (patch) | |
| tree | 75d6ae4424b434400a4932aaeb46093e89e01af4 /Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvHostChannel/NvHostChannelDeviceFile.cs | |
| parent | 532b8cad139ef611d7583788d05f3b35e45ee5a6 (diff) | |
Remove long <-> ulong casts from Nvservices code (#1848)
* Remove long <-> ulong casts from Nvservices code
* review: fix lint
Diffstat (limited to 'Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvHostChannel/NvHostChannelDeviceFile.cs')
| -rw-r--r-- | Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvHostChannel/NvHostChannelDeviceFile.cs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvHostChannel/NvHostChannelDeviceFile.cs b/Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvHostChannel/NvHostChannelDeviceFile.cs index 4a532cd7..807e0c92 100644 --- a/Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvHostChannel/NvHostChannelDeviceFile.cs +++ b/Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvHostChannel/NvHostChannelDeviceFile.cs @@ -158,7 +158,7 @@ namespace Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvHostChannel { NvMapHandle map = NvMapDeviceFile.GetMapFromHandle(Owner, commandBuffer.Mem); - var data = _memory.GetSpan((ulong)map.Address + commandBuffer.Offset, commandBuffer.WordsCount * 4); + var data = _memory.GetSpan(map.Address + commandBuffer.Offset, commandBuffer.WordsCount * 4); _device.Host1x.Submit(MemoryMarshal.Cast<byte, int>(data)); } @@ -253,12 +253,12 @@ namespace Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvHostChannel if (va != NvMemoryAllocator.PteUnmapped && va <= uint.MaxValue && (va + (uint)map.Size) <= uint.MaxValue) { _memoryAllocator.AllocateRange(va, (uint)map.Size, freeAddressStartPosition); - gmm.Map((ulong)map.Address, va, (uint)map.Size); - map.DmaMapAddress = (long)va; + gmm.Map(map.Address, va, (uint)map.Size); + map.DmaMapAddress = va; } else { - map.DmaMapAddress = unchecked((long)NvMemoryAllocator.PteUnmapped); + map.DmaMapAddress = NvMemoryAllocator.PteUnmapped; } } |
