mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2025-05-08 10:57:43 +02:00
19 lines
430 B
C#
19 lines
430 B
C#
using System;
|
|
using System.Runtime.InteropServices;
|
|
|
|
namespace ARMeilleure.Translation
|
|
{
|
|
class DelegateInfo
|
|
{
|
|
private readonly Delegate _dlg; // Ensure that this delegate will not be garbage collected.
|
|
|
|
public IntPtr FuncPtr { get; }
|
|
|
|
public DelegateInfo(Delegate dlg)
|
|
{
|
|
_dlg = dlg;
|
|
|
|
FuncPtr = Marshal.GetFunctionPointerForDelegate<Delegate>(dlg);
|
|
}
|
|
}
|
|
}
|