Replace old version of GetDroppedUtils
This commit is contained in:
parent
ffcdf76809
commit
222d0f538e
2 changed files with 2 additions and 5 deletions
|
|
@ -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++)
|
||||
|
|
|
|||
Loading…
Reference in a new issue