Browse Source

attempt to fix native aot.

Dan Walmsley 3 năm trước cách đây
mục cha
commit
09acf151b4
1 tập tin đã thay đổi với 5 bổ sung2 xóa
  1. 5 2
      src/Avalonia.OpenGL/GlInterface.cs

+ 5 - 2
src/Avalonia.OpenGL/GlInterface.cs

@@ -86,10 +86,13 @@ namespace Avalonia.OpenGL
         public GlViewport Viewport { get; }
         
         [GlEntryPoint("glFlush")]
-        public Action Flush { get; }
+        public UnmanagedAction Flush { get; }
+
+        [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+        public delegate void UnmanagedAction();
         
         [GlEntryPoint("glFinish")]
-        public Action Finish { get; }
+        public UnmanagedAction Finish { get; }
 
         [UnmanagedFunctionPointer(CallingConvention.StdCall)]
         public delegate IntPtr GlGetString(int v);