1
0
Fork 0
mirror of https://github.com/Ryujinx/SDL2-CS.git synced 2025-01-11 20:35:33 +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:
Justin Skiles 2013-09-02 15:18:11 -04:00
parent 68b9cdcea9
commit 552a8b5ead

View file

@ -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(