From f1d321f054b1da072e9c965c20f45399c00af1c0 Mon Sep 17 00:00:00 2001 From: realtradam Date: Wed, 7 Jun 2023 00:50:58 -0400 Subject: add letterboxing matrix --- include/rodeo/gfx.h | 24 +++++++++++++----------- include/rodeo/window.h | 4 ++-- 2 files changed, 15 insertions(+), 13 deletions(-) (limited to 'include') diff --git a/include/rodeo/gfx.h b/include/rodeo/gfx.h index a10e901..151bdda 100644 --- a/include/rodeo/gfx.h +++ b/include/rodeo/gfx.h @@ -8,7 +8,7 @@ #include "stc/cstr.h" void -rodeo_gfx_init(void); +rodeo_gfx_init(float width, float height); void rodeo_gfx_deinit(void); @@ -79,19 +79,21 @@ rodeo_gfx_frame_limit_set(uint32_t limit); uint32_t rodeo_gfx_frame_limit_get(void); -#define \ -mrodeo_gfx_do( \ -) \ - mrodeo_defer_do( \ - rodeo_gfx_init(), \ - rodeo_gfx_deinit() \ - ) - - #define \ -mrodeo_gfx_frame_do( \ +mrodeo_gfx_do( \ + width, \ + height \ ) \ mrodeo_defer_do( \ + rodeo_gfx_init(width, height), \ + rodeo_gfx_deinit() \ + ) + + +#define \ +mrodeo_gfx_frame_do( \ +) \ + mrodeo_defer_do( \ rodeo_gfx_frame_begin(), \ rodeo_gfx_frame_end() \ ) diff --git a/include/rodeo/window.h b/include/rodeo/window.h index dd505f2..5674174 100644 --- a/include/rodeo/window.h +++ b/include/rodeo/window.h @@ -21,10 +21,10 @@ rodeo_window_init( void rodeo_window_deinit(void); -uint16_t +uint32_t rodeo_window_screen_width_get(void); -uint16_t +uint32_t rodeo_window_screen_height_get(void); bool -- cgit v1.2.3