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:
@@ -542,7 +542,7 @@ namespace Raylib_cs
|
|||||||
|
|
||||||
/// <summary>Get dropped files names (memory should be freed)</summary>
|
/// <summary>Get dropped files names (memory should be freed)</summary>
|
||||||
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
[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>
|
/// <summary>Clear dropped files paths buffer (free memory)</summary>
|
||||||
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||||
|
@@ -14,13 +14,10 @@ namespace Raylib_cs
|
|||||||
return input.Substring(position, Math.Min(length, input.Length));
|
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()
|
public static unsafe string[] GetDroppedFiles()
|
||||||
{
|
{
|
||||||
int count;
|
int count;
|
||||||
var buffer = GetDroppedFiles(&count);
|
var buffer = Raylib.GetDroppedFiles(&count);
|
||||||
var files = new string[count];
|
var files = new string[count];
|
||||||
|
|
||||||
for (int i = 0; i < count; i++)
|
for (int i = 0; i < count; i++)
|
||||||
|
Reference in New Issue
Block a user