mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2025-06-29 06:36:24 +02:00
misc: Replace references to IntPtr/UIntPtr with nint/nuint + code cleanups.
This commit is contained in:
parent
a09d314817
commit
dfb4854d19
172 changed files with 902 additions and 914 deletions
|
@ -13,13 +13,13 @@ namespace Ryujinx.Graphics.Vulkan
|
|||
private readonly struct HostMemoryAllocation
|
||||
{
|
||||
public readonly Auto<MemoryAllocation> Allocation;
|
||||
public readonly IntPtr Pointer;
|
||||
public readonly nint Pointer;
|
||||
public readonly ulong Size;
|
||||
|
||||
public ulong Start => (ulong)Pointer;
|
||||
public ulong End => (ulong)Pointer + Size;
|
||||
|
||||
public HostMemoryAllocation(Auto<MemoryAllocation> allocation, IntPtr pointer, ulong size)
|
||||
public HostMemoryAllocation(Auto<MemoryAllocation> allocation, nint pointer, ulong size)
|
||||
{
|
||||
Allocation = allocation;
|
||||
Pointer = pointer;
|
||||
|
@ -50,7 +50,7 @@ namespace Ryujinx.Graphics.Vulkan
|
|||
public unsafe bool TryImport(
|
||||
MemoryRequirements requirements,
|
||||
MemoryPropertyFlags flags,
|
||||
IntPtr pointer,
|
||||
nint pointer,
|
||||
ulong size)
|
||||
{
|
||||
lock (_lock)
|
||||
|
@ -139,7 +139,7 @@ namespace Ryujinx.Graphics.Vulkan
|
|||
return true;
|
||||
}
|
||||
|
||||
public (Auto<MemoryAllocation>, ulong) GetExistingAllocation(IntPtr pointer, ulong size)
|
||||
public (Auto<MemoryAllocation>, ulong) GetExistingAllocation(nint pointer, ulong size)
|
||||
{
|
||||
lock (_lock)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue