Turn 1-element array to ref/out param
authorStefanos A. <stapostol@gmail.com>
Sat, 21 Dec 2013 21:41:35 +0000 (22:41 +0100)
committerStefanos A. <stapostol@gmail.com>
Sat, 21 Dec 2013 21:41:35 +0000 (22:41 +0100)
Source/OpenTK/Platform/Windows/Bindings/Wgl.cs

index e235beb..e1bd92a 100644 (file)
@@ -202,14 +202,14 @@ namespace OpenTK.Platform.Windows
             }
 
             public static
-            Boolean ChoosePixelFormat(IntPtr hdc, int[] piAttribIList, Single[] pfAttribFList, Int32 nMaxFormats, [Out] int[] piFormats, [Out] Int32[] nNumFormats)
+            Boolean ChoosePixelFormat(IntPtr hdc, int[] piAttribIList, Single[] pfAttribFList, Int32 nMaxFormats, [Out] int[] piFormats, out int nNumFormats)
             {
                 unsafe
                 {
                     fixed (int* piAttribIList_ptr = piAttribIList)
                     fixed (Single* pfAttribFList_ptr = pfAttribFList)
                     fixed (int* piFormats_ptr = piFormats)
-                    fixed (Int32* nNumFormats_ptr = nNumFormats)
+                    fixed (Int32* nNumFormats_ptr = &nNumFormats)
                     {
                         return Delegates.wglChoosePixelFormatARB((IntPtr)hdc, (int*)piAttribIList_ptr, (Single*)pfAttribFList_ptr, (UInt32)nMaxFormats, (int*)piFormats_ptr, (UInt32*)nNumFormats_ptr);
                     }