mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-10-01 15:38:29 +00:00
SDL_GetRectIntersectionFloat(): Allow rendering zero-sized srcrect
This commit is contained in:

committed by
Sam Lantinga

parent
d04b28926c
commit
27b256022b
@@ -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;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user