mirror of
https://github.com/Ryujinx/SDL2-CS.git
synced 2025-01-11 23:36:04 +00:00
Adding overload for SDL_LockTexture to allow IntPtr.Zero in the "rect" parameter. SDL documentation states that passing NULL for this value will lock the entire texture."
This commit is contained in:
parent
68b9cdcea9
commit
552a8b5ead
17
src/SDL2.cs
17
src/SDL2.cs
|
@ -1658,6 +1658,23 @@ namespace SDL2
|
|||
out byte b
|
||||
);
|
||||
|
||||
/* texture refers to an SDL_Texture*, pixels to a void* */
|
||||
/// <summary>
|
||||
/// Use this function to lock a portion of the texture for write-only pixel access.
|
||||
/// </summary>
|
||||
/// <param name="texture"></param>
|
||||
/// <param name="rect"></param>
|
||||
/// <param name="pixels"></param>
|
||||
/// <param name="pitch"></param>
|
||||
/// <returns></returns>
|
||||
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern int SDL_LockTexture(
|
||||
IntPtr texture,
|
||||
ref SDL_Rect rect,
|
||||
out IntPtr pixels,
|
||||
out int pitch
|
||||
);
|
||||
|
||||
/* texture refers to an SDL_Texture*, pixels to a void* */
|
||||
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern int SDL_LockTexture(
|
||||
|
|
Loading…
Reference in a new issue