From bdfd1b68ba169d6f6dc37d59efc4858aaf96b61e Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Fri, 29 May 2020 16:02:49 -0700 Subject: [PATCH] Fixed bug 5146 - SDL_RenderFillRect doesn't work in DirectFB Lacky It looks like refactoring of SDL2 internal API has broken SDL_RenderFillRect for DirectFB. In new version function SDL_RenderFillRect returns 0, but rectangle is not visible. Replacing "count" with "len" in the argument list for SDL_memcpy in DirectFB_QueueFillRects fixes problem. --- src/video/directfb/SDL_DirectFB_render.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/video/directfb/SDL_DirectFB_render.c b/src/video/directfb/SDL_DirectFB_render.c index cc31fb8f4..45114dc11 100644 --- a/src/video/directfb/SDL_DirectFB_render.c +++ b/src/video/directfb/SDL_DirectFB_render.c @@ -626,7 +626,7 @@ DirectFB_QueueFillRects(SDL_Renderer * renderer, SDL_RenderCommand *cmd, const S } cmd->data.draw.count = count; - SDL_memcpy(verts, rects, count); + SDL_memcpy(verts, rects, len); return 0; }