From 27b256022b7e0ba01923bb24ff0938ea613d13b7 Mon Sep 17 00:00:00 2001 From: Petar Popovic Date: Wed, 23 Apr 2025 20:24:42 +0200 Subject: [PATCH] SDL_GetRectIntersectionFloat(): Allow rendering zero-sized srcrect --- src/render/SDL_render.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/render/SDL_render.c b/src/render/SDL_render.c index 3cb5c8d2b8..342b25b2ec 100644 --- a/src/render/SDL_render.c +++ b/src/render/SDL_render.c @@ -3985,8 +3985,7 @@ bool SDL_RenderTexture(SDL_Renderer *renderer, SDL_Texture *texture, const SDL_F real_srcrect.w = (float)texture->w; real_srcrect.h = (float)texture->h; if (srcrect) { - if (!SDL_GetRectIntersectionFloat(srcrect, &real_srcrect, &real_srcrect) || - real_srcrect.w == 0.0f || real_srcrect.h == 0.0f) { + if (!SDL_GetRectIntersectionFloat(srcrect, &real_srcrect, &real_srcrect)) { return true; } }