Mercurial > sdl-ios-xcode
diff 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 |
line wrap: on
line diff
--- a/src/video/x11/SDL_x11shape.c Tue Aug 10 15:45:59 2010 -0400 +++ b/src/video/x11/SDL_x11shape.c Tue Aug 10 16:10:26 2010 -0400 @@ -81,12 +81,12 @@ } int -X11_SetWindowShape(SDL_WindowShaper *shaper,SDL_Surface *shape,SDL_WindowShapeMode *shapeMode) { +X11_SetWindowShape(SDL_WindowShaper *shaper,SDL_Surface *shape,SDL_WindowShapeMode *shape_mode) { if(shaper == NULL || shape == NULL || shaper->driverdata == NULL) return -1; #if SDL_VIDEO_DRIVER_X11_XSHAPE - if(!SDL_ISPIXELFORMAT_ALPHA(SDL_MasksToPixelFormatEnum(shape->format->BitsPerPixel,shape->format->Rmask,shape->format->Gmask,shape->format->Bmask,shape->format->Amask))) + if(shape->format->Amask == 0 && SDL_SHAPEMODEALPHA(shape_mode->mode)) return -2; if(shape->w != shaper->window->w || shape->h != shaper->window->h) return -3;