From 796e0b9e54a49037bdde3a4e1df6c29d43ddc988 Mon Sep 17 00:00:00 2001 From: Justin Skiles Date: Mon, 26 Aug 2013 18:44:39 -0400 Subject: [PATCH] Added overload to SDL_RenderCopy method to allow SourceRectangle to be passed as an IntPtr. This allows developers to pass IntPtr.Zero to take advantage of internal SDL default values for null rectangles. --- src/SDL2.cs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/SDL2.cs b/src/SDL2.cs index 5bf3ba8..3a990aa 100644 --- a/src/SDL2.cs +++ b/src/SDL2.cs @@ -1246,6 +1246,15 @@ namespace SDL2 ref SDL_Rect srcrect, ref SDL_Rect dstrect ); + + /* renderer refers to an SDL_Renderer*, texture to an SDL_Texture* */ + [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + public static extern int SDL_RenderCopy( + IntPtr renderer, + IntPtr texture, + IntPtr srcrect, + ref SDL_Rect dstrect + ); /* renderer refers to an SDL_Renderer*, texture to an SDL_Texture* */ [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]