3 # User Sam Lantinga <slouken@libsdl.org>
4 # Date 1479201270 28800
5 # Node ID ea44906e19b837f4d5b309525ca79ed9d00b1897
6 # Parent 6b2307dbec54f0bf4d5d8abf86241e29f3a03562
7 Fixed bug 3490 - Build failure with --enable-video-directfb
11 Building SDL 2.0.5, or even the Mercurial snapshot (r10608) with GCC 6.2.1 and --enable-video-directfb generates a number of compiler diagnostics and fails.
13 Downloaded from upstream repo
14 https://hg.libsdl.org/SDL/rev/ea44906e19b8
16 Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
18 diff -r 6b2307dbec54 -r ea44906e19b8 src/video/directfb/SDL_DirectFB_render.c
19 --- a/src/video/directfb/SDL_DirectFB_render.c Tue Nov 15 01:12:27 2016 -0800
20 +++ b/src/video/directfb/SDL_DirectFB_render.c Tue Nov 15 01:14:30 2016 -0800
22 Uint32 format, void * pixels, int pitch)
26 + unsigned char* laypixels;
28 DFBSurfacePixelFormat dfb_format;
29 DirectFB_RenderData *data = (DirectFB_RenderData *) renderer->driverdata;
31 SDL_Window *window = renderer->window;
32 SDL_DFB_WINDOWDATA(window);
35 + unsigned char* laypixels;
37 DFBSurfacePixelFormat dfb_format;
39 diff -r 6b2307dbec54 -r ea44906e19b8 src/video/directfb/SDL_DirectFB_shape.c
40 --- a/src/video/directfb/SDL_DirectFB_shape.c Tue Nov 15 01:12:27 2016 -0800
41 +++ b/src/video/directfb/SDL_DirectFB_shape.c Tue Nov 15 01:14:30 2016 -0800
44 DirectFB_CreateShaper(SDL_Window* window) {
45 SDL_WindowShaper* result = NULL;
46 + SDL_ShapeData* data;
47 + int resized_properly;
49 result = malloc(sizeof(SDL_WindowShaper));
50 result->window = window;
51 result->mode.mode = ShapeModeDefault;
52 result->mode.parameters.binarizationCutoff = 1;
53 result->userx = result->usery = 0;
54 - SDL_ShapeData* data = SDL_malloc(sizeof(SDL_ShapeData));
55 + data = SDL_malloc(sizeof(SDL_ShapeData));
56 result->driverdata = data;
58 window->shaper = result;
59 - int resized_properly = DirectFB_ResizeWindowShape(window);
60 + resized_properly = DirectFB_ResizeWindowShape(window);
61 SDL_assert(resized_properly == 0);