summaryrefslogtreecommitdiffstats
path: root/meta/recipes-graphics/libsdl2/libsdl2/directfb-renderfillrect-fix.patch
blob: 83d4f4b1ec3a61b62f2eafa3dd812491ee1107f1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# HG changeset patch
# User Sam Lantinga <slouken@libsdl.org>
# Date 1590793369 25200
# Node ID a90089f75990e8b07a1dcf931c5f8a580ae343bf
# Parent  a9b4bd264f3cbedc4f3287b3ec6b32311370ba85
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.

--

The patch was imported from the libsdl Mercurial repository
(https://hg.libsdl.org/SDL) as of changeset id a90089f75990.

Upstream-Status: Backport

Signed-off-by: Mark Jonas <toertel@gmail.com>

diff -r a9b4bd264f3c -r a90089f75990 src/video/directfb/SDL_DirectFB_render.c
--- a/src/video/directfb/SDL_DirectFB_render.c	Thu May 21 00:06:09 2020 -0400
+++ b/src/video/directfb/SDL_DirectFB_render.c	Fri May 29 16:02:49 2020 -0700
@@ -626,7 +626,7 @@
     }

     cmd->data.draw.count = count;
-    SDL_memcpy(verts, rects, count);
+    SDL_memcpy(verts, rects, len);
     return 0;
 }