misc: Replace references to IntPtr/UIntPtr with nint/nuint + code cleanups.

This commit is contained in:
Evan Husted
2024-10-26 08:46:41 -05:00
parent a09d314817
commit dfb4854d19
172 changed files with 902 additions and 914 deletions

View File

@@ -6,17 +6,17 @@ namespace Ryujinx.Cpu.Signal
static partial class WindowsSignalHandlerRegistration
{
[LibraryImport("kernel32.dll")]
private static partial IntPtr AddVectoredExceptionHandler(uint first, IntPtr handler);
private static partial nint AddVectoredExceptionHandler(uint first, nint handler);
[LibraryImport("kernel32.dll")]
private static partial ulong RemoveVectoredExceptionHandler(IntPtr handle);
private static partial ulong RemoveVectoredExceptionHandler(nint handle);
public static IntPtr RegisterExceptionHandler(IntPtr action)
public static nint RegisterExceptionHandler(nint action)
{
return AddVectoredExceptionHandler(1, action);
}
public static bool RemoveExceptionHandler(IntPtr handle)
public static bool RemoveExceptionHandler(nint handle)
{
return RemoveVectoredExceptionHandler(handle) != 0;
}