Use the correct source rectangle when doing scaled blits

Fixes https://github.com/libsdl-org/SDL/issues/15309
This commit is contained in:
Sam Lantinga
2026-04-03 01:32:09 -07:00
parent f3a3b4b95a
commit 5ae1308e5b

View File

@@ -2326,7 +2326,7 @@ SDL_Surface *SDL_ConvertSurfaceRect(SDL_Surface *surface, const SDL_Rect *rect,
return NULL;
}
return SDL_ConvertSurfaceRectAndColorspace(surface, NULL, format, NULL, SDL_GetDefaultColorspaceForFormat(format), surface->props);
return SDL_ConvertSurfaceRectAndColorspace(surface, rect, format, NULL, SDL_GetDefaultColorspaceForFormat(format), surface->props);
}
SDL_Surface *SDL_ConvertSurface(SDL_Surface *surface, SDL_PixelFormat format)