2
0
mirror of https://github.com/raylib-cs/raylib-cs synced 2025-09-09 03:01:41 -04:00

Replace old version of GetDroppedUtils

This commit is contained in:
2021-11-06 22:48:28 +00:00
parent ffcdf76809
commit 222d0f538e
2 changed files with 2 additions and 5 deletions

View File

@@ -542,7 +542,7 @@ namespace Raylib_cs
/// <summary>Get dropped files names (memory should be freed)</summary>
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern IntPtr GetDroppedFiles(ref int count);
public static unsafe extern byte** GetDroppedFiles(int* count);
/// <summary>Clear dropped files paths buffer (free memory)</summary>
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]

View File

@@ -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++)