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>
|
||||
[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)]
|
||||
|
@@ -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++)
|
||||
|
Reference in New Issue
Block a user