-
-
Notifications
You must be signed in to change notification settings - Fork 86
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add missing Vulkan and Keyboard functions
- Loading branch information
1 parent
a3b95da
commit f49b3ee
Showing
5 changed files
with
115 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
using System.Runtime.InteropServices; | ||
using System.Security; | ||
using System; | ||
|
||
namespace SFML.System | ||
{ | ||
/// <summary> | ||
/// Contains functions related to memory allocation. | ||
/// For internal use only. | ||
/// </summary> | ||
public static class Allocation | ||
{ | ||
/// <summary> | ||
/// This function deallocates the memory being pointed to | ||
/// using the free function from the C standard library. | ||
/// | ||
/// The memory must have been previously allocated using a call | ||
/// to malloc. | ||
/// </summary> | ||
/// <param name="ptr">Pointer to the memory to deallocate</param> | ||
public static void Free(IntPtr ptr) => sfFree(ptr); | ||
|
||
[DllImport(CSFML.system, CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
private static extern void sfFree(IntPtr ptr); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters