mirror of
https://github.com/Ryujinx/SDL2-CS.git
synced 2024-12-23 04:55:28 +00:00
Added some public RWops entry points.
This commit is contained in:
parent
82cd690656
commit
1055efcc34
10
src/SDL2.cs
10
src/SDL2.cs
|
@ -64,7 +64,7 @@ namespace SDL2
|
|||
|
||||
#region SDL_rwops.h
|
||||
|
||||
/* Note about SDL2# and RWops:
|
||||
/* Note about SDL2# and Internal RWops:
|
||||
* These functions are currently not supported for public use.
|
||||
* They are only meant to be used internally in functions marked with
|
||||
* the phrase "THIS IS AN RWops FUNCTION!"
|
||||
|
@ -84,6 +84,14 @@ namespace SDL2
|
|||
string mode
|
||||
);
|
||||
|
||||
/* These are the public RWops functions. They should be used by
|
||||
* functions marked with the phrase "THIS IS A PUBLIC RWops FUNCTION!"
|
||||
*/
|
||||
|
||||
/* IntPtr refers to an SDL_RWops */
|
||||
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern IntPtr SDL_RWFromMem(byte[] mem, int size);
|
||||
|
||||
#endregion
|
||||
|
||||
#region SDL_main.h
|
||||
|
|
|
@ -94,6 +94,14 @@ namespace SDL2
|
|||
string file
|
||||
);
|
||||
|
||||
/* src refers to an SDL_RWops*, IntPtr to an SDL_Surface* */
|
||||
/* THIS IS A PUBLIC RWops FUNCTION! */
|
||||
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern IntPtr IMG_Load_RW(
|
||||
IntPtr src,
|
||||
int freesrc
|
||||
);
|
||||
|
||||
/* IntPtr refers to an SDL_Texture*, renderer to an SDL_Renderer* */
|
||||
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern IntPtr IMG_LoadTexture(
|
||||
|
@ -120,6 +128,15 @@ namespace SDL2
|
|||
string file
|
||||
);
|
||||
|
||||
/* surface refers to an SDL_Surface*, dst to an SDL_RWops* */
|
||||
/* THIS IS A PUBLIC RWops FUNCTION! */
|
||||
[DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern int IMG_SavePNG_RW(
|
||||
IntPtr surface,
|
||||
IntPtr dst,
|
||||
int freedst
|
||||
);
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue