Fix SDL_SaveBMP
This commit is contained in:
parent
2658498408
commit
9f0949be21
17
src/SDL2.cs
17
src/SDL2.cs
@ -2069,13 +2069,20 @@ namespace SDL2
|
|||||||
ref SDL_Rect dstrect
|
ref SDL_Rect dstrect
|
||||||
);
|
);
|
||||||
|
|
||||||
/* surface refers to an SDL_Surface* */
|
/* These are for SDL_SaveBMP, which is a macro in the SDL headers. */
|
||||||
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
/* IntPtr refers to an SDL_Surface* */
|
||||||
public static extern int SDL_SaveBMP(
|
/* THIS IS AN RWops FUNCTION! */
|
||||||
|
[DllImport(nativeLibName, EntryPoint = "SDL_SaveBMP_RW", CallingConvention = CallingConvention.Cdecl)]
|
||||||
|
private static extern int INTERNAL_SDL_SaveBMP_RW(
|
||||||
IntPtr surface,
|
IntPtr surface,
|
||||||
[In()] [MarshalAs(UnmanagedType.LPStr)]
|
IntPtr src,
|
||||||
string file
|
int freesrc
|
||||||
);
|
);
|
||||||
|
public static int SDL_SaveBMP(IntPtr surface, string file)
|
||||||
|
{
|
||||||
|
IntPtr rwops = INTERNAL_SDL_RWFromFile(file, "wb");
|
||||||
|
return INTERNAL_SDL_SaveBMP_RW(surface, rwops, 1);
|
||||||
|
}
|
||||||
|
|
||||||
/* surface refers to an SDL_Surface* */
|
/* surface refers to an SDL_Surface* */
|
||||||
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user