From 10dc1ee80908780b55ea5dc121d1dbe6a84dfacf Mon Sep 17 00:00:00 2001 From: Jason Bou-Samra <154414066+bou-samra@users.noreply.github.com> Date: Sat, 28 Sep 2024 09:51:23 +1000 Subject: [PATCH] Update sdl.c --- src/sdl.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/sdl.c b/src/sdl.c index 5ab147b..2ab6b4d 100644 --- a/src/sdl.c +++ b/src/sdl.c @@ -12,6 +12,12 @@ SDL_RWops* rwops_new; SDL_Surface* image; SDL_Texture * texture; +Uint32 format; +const char *format2; +int access; +int widt; +int heig; + ///////////////////////// WINDOW PARMS ///////////////////////// #define WIDTH 1280 // pixels #define HEIGHT 800 // pixels @@ -53,6 +59,9 @@ int init_gfx(void) { texture = SDL_CreateTextureFromSurface(sr, image); SDL_FreeSurface( image ); image = NULL; + SDL_QueryTexture(texture, &format, &access, &widt, &heig); + format2 = SDL_GetPixelFormatName(format); + printf("format: %s, access: %i, width: %i, height: %i,", format2, access, widt, heig); return 0; }