mirror of
https://github.com/Relintai/sdl2_frt.git
synced 2024-12-16 11:06:49 +01:00
Fixed bug 3490 - Build failure with --enable-video-directfb
felix 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.
This commit is contained in:
parent
ab8bd3d96b
commit
009a3f5aa6
@ -1273,7 +1273,7 @@ DirectFB_RenderReadPixels(SDL_Renderer * renderer, const SDL_Rect * rect,
|
|||||||
Uint32 format, void * pixels, int pitch)
|
Uint32 format, void * pixels, int pitch)
|
||||||
{
|
{
|
||||||
Uint32 sdl_format;
|
Uint32 sdl_format;
|
||||||
void * laypixels;
|
unsigned char* laypixels;
|
||||||
int laypitch;
|
int laypitch;
|
||||||
DFBSurfacePixelFormat dfb_format;
|
DFBSurfacePixelFormat dfb_format;
|
||||||
DirectFB_RenderData *data = (DirectFB_RenderData *) renderer->driverdata;
|
DirectFB_RenderData *data = (DirectFB_RenderData *) renderer->driverdata;
|
||||||
@ -1303,7 +1303,7 @@ DirectFB_RenderWritePixels(SDL_Renderer * renderer, const SDL_Rect * rect,
|
|||||||
SDL_Window *window = renderer->window;
|
SDL_Window *window = renderer->window;
|
||||||
SDL_DFB_WINDOWDATA(window);
|
SDL_DFB_WINDOWDATA(window);
|
||||||
Uint32 sdl_format;
|
Uint32 sdl_format;
|
||||||
void * laypixels;
|
unsigned char* laypixels;
|
||||||
int laypitch;
|
int laypitch;
|
||||||
DFBSurfacePixelFormat dfb_format;
|
DFBSurfacePixelFormat dfb_format;
|
||||||
|
|
||||||
|
@ -37,17 +37,19 @@ DirectFB_CreateShapedWindow(const char *title,unsigned int x,unsigned int y,unsi
|
|||||||
SDL_WindowShaper*
|
SDL_WindowShaper*
|
||||||
DirectFB_CreateShaper(SDL_Window* window) {
|
DirectFB_CreateShaper(SDL_Window* window) {
|
||||||
SDL_WindowShaper* result = NULL;
|
SDL_WindowShaper* result = NULL;
|
||||||
|
SDL_ShapeData* data;
|
||||||
|
int resized_properly;
|
||||||
|
|
||||||
result = malloc(sizeof(SDL_WindowShaper));
|
result = malloc(sizeof(SDL_WindowShaper));
|
||||||
result->window = window;
|
result->window = window;
|
||||||
result->mode.mode = ShapeModeDefault;
|
result->mode.mode = ShapeModeDefault;
|
||||||
result->mode.parameters.binarizationCutoff = 1;
|
result->mode.parameters.binarizationCutoff = 1;
|
||||||
result->userx = result->usery = 0;
|
result->userx = result->usery = 0;
|
||||||
SDL_ShapeData* data = SDL_malloc(sizeof(SDL_ShapeData));
|
data = SDL_malloc(sizeof(SDL_ShapeData));
|
||||||
result->driverdata = data;
|
result->driverdata = data;
|
||||||
data->surface = NULL;
|
data->surface = NULL;
|
||||||
window->shaper = result;
|
window->shaper = result;
|
||||||
int resized_properly = DirectFB_ResizeWindowShape(window);
|
resized_properly = DirectFB_ResizeWindowShape(window);
|
||||||
SDL_assert(resized_properly == 0);
|
SDL_assert(resized_properly == 0);
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
|
Loading…
Reference in New Issue
Block a user