Watch
2
0
Fork
You've already forked raylib-cs
0

Add UnloadFileData

- Add missing UnloadFileData function. Frees memory allocated by LoadFileData.
This commit is contained in:
Rgebee 2021-01-25 12:23:10 +00:00
commit 17be194afc

View file

@ -1189,6 +1189,11 @@ namespace Raylib_cs
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern IntPtr LoadFileData(string fileName, ref int bytesRead); public static extern IntPtr LoadFileData(string fileName, ref int bytesRead);
// Unload file data allocated by LoadFileData()
// data refers to a unsigned char *
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void UnloadFileData(IntPtr data);
// Save data to file from byte array (write) // Save data to file from byte array (write)
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern void SaveFileData(string fileName, IntPtr data, int bytesToWrite); public static extern void SaveFileData(string fileName, IntPtr data, int bytesToWrite);