changeset 4947:619884e8a714

Fixed trying to create an XRender texture for YUV formats
author Sam Lantinga <slouken@libsdl.org>
date Sat, 01 Jan 2011 20:46:39 -0800
parents acdd88ebd0a0
children 6546eaa20271
files src/video/x11/SDL_x11render.c
diffstat 1 files changed, 3 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/video/x11/SDL_x11render.c	Sat Jan 01 20:44:38 2011 -0800
+++ b/src/video/x11/SDL_x11render.c	Sat Jan 01 20:46:39 2011 -0800
@@ -1010,8 +1010,7 @@
                 return -1;
             }
         }
-    } 
-    else {
+    } else {
         data->image =
             XCreateImage(renderdata->display, data->visual,
                          data->depth, ZPixmap, 0, NULL,
@@ -1036,7 +1035,7 @@
     data->pitch = data->image->bytes_per_line;
 
 #ifdef SDL_VIDEO_DRIVER_X11_XRENDER
-    if(renderdata->use_xrender) {
+    if(renderdata->use_xrender && !data->yuv) {
         gcv.graphics_exposures = False;
         data->gc =
             XCreateGC(renderdata->display, data->pixmap, GCGraphicsExposures, &gcv);
@@ -1922,7 +1921,7 @@
         SDL_AddDirtyRect(&data->dirty, dstrect);
     }
 #ifdef SDL_VIDEO_DRIVER_X11_XRENDER
-    if (data->use_xrender) {
+    if (data->use_xrender && !texturedata->yuv) {
         if(texture->access == SDL_TEXTUREACCESS_STREAMING) {
 #ifndef NO_SHARED_MEMORY
             if(texturedata->shminfo.shmaddr) {