comparison src/video/x11/SDL_x11shape.c @ 4846:4f1573996a65

Fixed a bug in X11 shaping that refused to use color-key mode.
author Eli Gottlieb <eligottlieb@gmail.com>
date Tue, 10 Aug 2010 16:10:26 -0400
parents 61cb2d20a46f
children 5624fb0190b5
comparison
equal deleted inserted replaced
4845:61cb2d20a46f 4846:4f1573996a65
79 79
80 return 0; 80 return 0;
81 } 81 }
82 82
83 int 83 int
84 X11_SetWindowShape(SDL_WindowShaper *shaper,SDL_Surface *shape,SDL_WindowShapeMode *shapeMode) { 84 X11_SetWindowShape(SDL_WindowShaper *shaper,SDL_Surface *shape,SDL_WindowShapeMode *shape_mode) {
85 if(shaper == NULL || shape == NULL || shaper->driverdata == NULL) 85 if(shaper == NULL || shape == NULL || shaper->driverdata == NULL)
86 return -1; 86 return -1;
87 87
88 #if SDL_VIDEO_DRIVER_X11_XSHAPE 88 #if SDL_VIDEO_DRIVER_X11_XSHAPE
89 if(!SDL_ISPIXELFORMAT_ALPHA(SDL_MasksToPixelFormatEnum(shape->format->BitsPerPixel,shape->format->Rmask,shape->format->Gmask,shape->format->Bmask,shape->format->Amask))) 89 if(shape->format->Amask == 0 && SDL_SHAPEMODEALPHA(shape_mode->mode))
90 return -2; 90 return -2;
91 if(shape->w != shaper->window->w || shape->h != shaper->window->h) 91 if(shape->w != shaper->window->w || shape->h != shaper->window->h)
92 return -3; 92 return -3;
93 SDL_ShapeData *data = shaper->driverdata; 93 SDL_ShapeData *data = shaper->driverdata;
94 94