Fix initial value of the xrender_available boolean in X11_CreateTexture.
authorSunny Sachanandani <sunnysachanandani@gmail.com>
Fri, 28 May 2010 20:47:24 +0530
changeset 4574 bfb4933c0efa
parent 4573 6399178be313
child 4575 037ddbeee6c3
Fix initial value of the xrender_available boolean in X11_CreateTexture.
src/video/x11/SDL_x11render.c
--- a/src/video/x11/SDL_x11render.c	Fri May 28 20:40:09 2010 +0530
+++ b/src/video/x11/SDL_x11render.c	Fri May 28 20:47:24 2010 +0530
@@ -397,7 +397,6 @@
     X11_TextureData *data;
     int pitch_alignmask = ((renderdata->scanline_pad / 8) - 1);
 
-
     data = (X11_TextureData *) SDL_calloc(1, sizeof(*data));
     if (!data) {
         SDL_OutOfMemory();
@@ -418,6 +417,8 @@
            can be no BadMatch error since Xrender takes care of that.
         */
 #ifdef SDL_VIDEO_DRIVER_X11_XRENDER
+        // Assume the texture is supported by Xrender
+        data->xrender_available = TRUE
         if(renderdata->xrender_available == SDL_False) {
             if (texture->format != display->current_mode.format) {
                 SDL_SetError("Texture format doesn't match window format");