mirror of
https://git.naxdy.org/Mirror/Ryujinx.git
synced 2025-12-16 12:09:51 +00:00
18 lines
391 B
C#
18 lines
391 B
C#
using System.Diagnostics;
|
|
using System.Runtime.CompilerServices;
|
|
|
|
namespace Ryujinx.Graphics.OpenGL
|
|
{
|
|
static class Handle
|
|
{
|
|
public static T FromInt32<T>(int handle) where T : unmanaged
|
|
{
|
|
Debug.Assert(Unsafe.SizeOf<T>() == sizeof(ulong));
|
|
|
|
ulong handle64 = (uint)handle;
|
|
|
|
return Unsafe.As<ulong, T>(ref handle64);
|
|
}
|
|
}
|
|
}
|