From 5238ccd88e0be36f8e8be16b5f3de06a8836890d Mon Sep 17 00:00:00 2001 From: Ethan Lee Date: Tue, 9 Apr 2013 10:49:31 -0400 Subject: [PATCH] Durr, that is a macro, flibit. --- src/SDL2.cs | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/SDL2.cs b/src/SDL2.cs index 9e508c2..a09912d 100644 --- a/src/SDL2.cs +++ b/src/SDL2.cs @@ -1789,6 +1789,11 @@ namespace SDL2 #region SDL_surface.h + public const uint SDL_SWSURFACE = 0x00000000; + public const uint SDL_PREALLOC = 0x00000001; + public const uint SDL_RLEACCEL = 0x00000002; + public const uint SDL_DONTFREE = 0x00000004; + [StructLayout(LayoutKind.Sequential)] public struct SDL_Surface { @@ -1806,6 +1811,11 @@ namespace SDL2 public int refcount; } + public static bool SDL_MUSTLOCK(ref SDL_Surface surface) + { + return (surface.flags & SDL_RLEACCEL) != 0; + } + [DllImport(nativeLibName)] public static extern int SDL_BlitSurface( ref SDL_Surface src, @@ -2047,9 +2057,6 @@ namespace SDL2 ref SDL_Rect dstrect ); - [DllImport(nativeLibName)] - public static extern SDL_bool SDL_MUSTLOCK(ref SDL_Surface surface); - [DllImport(nativeLibName)] public static extern int SDL_SaveBMP( ref SDL_Surface surface,