mirror of
https://github.com/Ryujinx/SDL2-CS.git
synced 2025-01-22 09:01:00 +00:00
Add Render[Get/Set]ClipRect (thanks Martin!)
This commit is contained in:
parent
7a39b5d49c
commit
ed8c91d2f3
23
src/SDL2.cs
23
src/SDL2.cs
|
@ -1926,6 +1926,13 @@ namespace SDL2
|
||||||
int count
|
int count
|
||||||
);
|
);
|
||||||
|
|
||||||
|
/* renderer refers to an SDL_Renderer* */
|
||||||
|
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||||
|
public static extern void SDL_RenderGetClipRect(
|
||||||
|
IntPtr renderer,
|
||||||
|
out SDL_Rect rect
|
||||||
|
);
|
||||||
|
|
||||||
/* renderer refers to an SDL_Renderer* */
|
/* renderer refers to an SDL_Renderer* */
|
||||||
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||||
public static extern void SDL_RenderGetLogicalSize(
|
public static extern void SDL_RenderGetLogicalSize(
|
||||||
|
@ -1955,6 +1962,22 @@ namespace SDL2
|
||||||
int pitch
|
int pitch
|
||||||
);
|
);
|
||||||
|
|
||||||
|
/* renderer refers to an SDL_Renderer* */
|
||||||
|
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||||
|
public static extern int SDL_RenderSetClipRect(
|
||||||
|
IntPtr renderer,
|
||||||
|
ref SDL_Rect rect
|
||||||
|
);
|
||||||
|
|
||||||
|
/* renderer refers to an SDL_Renderer*
|
||||||
|
* This overload allows for IntPtr.Zero (null) to be passed for rect.
|
||||||
|
*/
|
||||||
|
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||||
|
public static extern int SDL_RenderSetClipRect(
|
||||||
|
IntPtr renderer,
|
||||||
|
IntPtr rect
|
||||||
|
);
|
||||||
|
|
||||||
/* renderer refers to an SDL_Renderer* */
|
/* renderer refers to an SDL_Renderer* */
|
||||||
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||||
public static extern int SDL_RenderSetLogicalSize(
|
public static extern int SDL_RenderSetLogicalSize(
|
||||||
|
|
Loading…
Reference in a new issue