diff --git a/Raylib-cs/Raylib.cs b/Raylib-cs/Raylib.cs index 3039341..16b8ad3 100644 --- a/Raylib-cs/Raylib.cs +++ b/Raylib-cs/Raylib.cs @@ -542,7 +542,7 @@ namespace Raylib_cs /// Get dropped files names (memory should be freed) [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] - public static extern IntPtr GetDroppedFiles(ref int count); + public static unsafe extern byte** GetDroppedFiles(int* count); /// Clear dropped files paths buffer (free memory) [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] diff --git a/Raylib-cs/RaylibUtils.cs b/Raylib-cs/RaylibUtils.cs index 22efcb8..57e5780 100644 --- a/Raylib-cs/RaylibUtils.cs +++ b/Raylib-cs/RaylibUtils.cs @@ -14,13 +14,10 @@ namespace Raylib_cs return input.Substring(position, Math.Min(length, input.Length)); } - [DllImport(Raylib.nativeLibName, CallingConvention = CallingConvention.Cdecl)] - public static unsafe extern byte** GetDroppedFiles(int* count); - public static unsafe string[] GetDroppedFiles() { int count; - var buffer = GetDroppedFiles(&count); + var buffer = Raylib.GetDroppedFiles(&count); var files = new string[count]; for (int i = 0; i < count; i++)