Initial update to 4.2
This commit is contained in:
parent
737062763d
commit
1a78bc3c53
8 changed files with 153 additions and 39 deletions
|
|
@ -190,14 +190,14 @@ namespace Raylib_cs
|
|||
/// <summary>Get dropped files names (memory should be freed)</summary>
|
||||
public static string[] GetDroppedFiles()
|
||||
{
|
||||
int count;
|
||||
var buffer = GetDroppedFiles(&count);
|
||||
var files = new string[count];
|
||||
var filePathList = LoadDroppedFiles();
|
||||
var files = new string[filePathList.count];
|
||||
|
||||
for (var i = 0; i < count; i++)
|
||||
for (var i = 0; i < filePathList.count; i++)
|
||||
{
|
||||
files[i] = Marshal.PtrToStringUTF8((IntPtr)buffer[i]);
|
||||
files[i] = Marshal.PtrToStringUTF8((IntPtr)filePathList.paths[i]);
|
||||
}
|
||||
UnloadDroppedFiles(filePathList);
|
||||
|
||||
return files;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue