~sircmpwn/hare-sdl2

6d7c5bf0273094dc7c3670ec26d065a816d7dce2 — Joe Finney 8 months ago 260b9ef
Add SDL_GetRendererOutputSize.

Signed-off-by: Joe Finney <me@spxtr.net>
1 files changed, 9 insertions(+), 0 deletions(-)

M sdl2/render.ha
M sdl2/render.ha => sdl2/render.ha +9 -0
@@ 104,6 104,15 @@ export fn SDL_CreateRenderer(
// See also: [[SDL_CreateRenderer]].
export @symbol("SDL_DestroyRenderer") fn SDL_DestroyRenderer(renderer: *SDL_Renderer) void;

@symbol("SDL_GetRendererOutputSize") fn _SDL_GetRendererOutputSize(renderer: *SDL_Renderer,
	w: *int, h: *int) int;

// Get the output size in pixels of a rendering context.
export fn SDL_GetRendererOutputSize(
	renderer: *SDL_Renderer,
	w: *int, h: *int,
) (void | error) = wrapvoid(_SDL_GetRendererOutputSize(renderer, w, h));

// Opaque value for the alpha channel (255).
export def ALPHA_OPAQUE: u8 = 255;