# HG changeset patch # User Sunny Sachanandani # Date 1275298776 -19800 # Node ID cb338fa6535c500cb1d55712c509eada01ffa3f3 # Parent 87a2d87786d42edc3bd78368dea771a3210fca2d Xrender uses 16 bit color per channel. Fixed the color handling in X11_RenderFillRects to match this. Xrender just works now for filling rectangles :D . diff -r 87a2d87786d4 -r cb338fa6535c src/video/x11/SDL_x11render.c --- a/src/video/x11/SDL_x11render.c Mon May 31 13:27:27 2010 +0530 +++ b/src/video/x11/SDL_x11render.c Mon May 31 15:09:36 2010 +0530 @@ -1001,10 +1001,10 @@ if(data->xrender_available == SDL_TRUE) { XRenderColor xrender_foreground_color; - xrender_foreground_color.red = renderer->r; - xrender_foreground_color.green = renderer->g; - xrender_foreground_color.blue = renderer->b; - xrender_foreground_color.alpha = renderer->a; + xrender_foreground_color.red = (unsigned short) ((renderer->r / 255.0) * 0xFFFF); + xrender_foreground_color.green = (unsigned short) ((renderer->g / 255.0) * 0xFFFF); + xrender_foreground_color.blue = (unsigned short) ((renderer->b / 255.0) * 0xFFFF); + xrender_foreground_color.alpha = (unsigned short) ((renderer->a / 255.0) * 0xFFFF); XRenderFillRectangles(data->display, PictOpSrc, data->drawable_pict, &xrender_foreground_color, xrects, xcount); }