diff options
| author | ubq323 <ubq323@ubq323.website> | 2024-04-27 20:02:27 +0100 |
|---|---|---|
| committer | Drew DeVault <sir@cmpwn.com> | 2024-05-27 12:14:27 +0200 |
| commit | 27476717c866a40937c2a20ecc906cf0e8d77303 (patch) | |
| tree | fcaccd13d0d08b4db0b26191a5971d8c483df5ea | |
| parent | add a few functions (diff) | |
| download | hare-chip8-27476717c866a40937c2a20ecc906cf0e8d77303.tar.gz | |
add SDL_FreeSurface
| -rw-r--r-- | sdl2/surface.ha | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sdl2/surface.ha b/sdl2/surface.ha index 7b6438e..afca40c 100644 --- a/sdl2/surface.ha +++ b/sdl2/surface.ha @@ -36,6 +36,13 @@ export fn SDL_CreateRGBSurface(flags: u32, Gmask, Bmask, Amask))?: *SDL_Surface; }; +@symbol("SDL_FreeSurface") fn _SDL_FreeSurface(surface: nullable *SDL_Surface) void; + +// Free an RGB surface. +export fn SDL_FreeSurface(surface: nullable *SDL_Surface) void = { + _SDL_FreeSurface(surface); +}; + // NB SDL_BlitSurface is aliased to SDL_UpperBlit via a macro in the SDL header @symbol("SDL_UpperBlit") fn _SDL_BlitSurface(src: *SDL_Surface, srcrect: nullable *SDL_Rect, dst: *SDL_Surface, dstrect: nullable *SDL_Rect) int; |
