From 062241ca829244d5eaad0a84f279e03c8dced563 Mon Sep 17 00:00:00 2001 From: Ethan Lee Date: Mon, 18 Nov 2013 11:28:32 -0500 Subject: [PATCH] SDL2_image has SavePNG, woohoo! --- src/SDL2_image.cs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/SDL2_image.cs b/src/SDL2_image.cs index 5df4bac..806b0b0 100644 --- a/src/SDL2_image.cs +++ b/src/SDL2_image.cs @@ -112,6 +112,14 @@ namespace SDL2 string[] xpm ); + /* surface refers to an SDL_Surface* */ + [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + public static extern int IMG_SavePNG( + IntPtr surface, + [In()] [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(LPUtf8StrMarshaler))] + string file + ); + #endregion } }