Mercurial > sdl-ios-xcode
diff src/video/SDL_shape.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 | 0998d1b5dd23 |
children | 4201864f77e7 40b46225e3cf |
line wrap: on
line diff
--- a/src/video/SDL_shape.c Tue Aug 10 15:45:59 2010 -0400 +++ b/src/video/SDL_shape.c Tue Aug 10 16:10:26 2010 -0400 @@ -104,7 +104,7 @@ break; case(ShapeModeColorKey): key = mode.parameters.colorKey; - mask_value = ((key.r != r && key.g != g && key.b != b) ? 1 : 0); + mask_value = ((key.r != r || key.g != g || key.b != b) ? 1 : 0); break; } bitmap[bitmap_pixel / ppb] |= mask_value << (7 - ((ppb - 1) - (bitmap_pixel % ppb))); @@ -237,7 +237,6 @@ if(shapeMode != NULL) window->shaper->mode = *shapeMode; - //TODO: Platform-specific implementations of SetWindowShape. X11 is finished. Win32 is finished. Debugging is in progress on both. result = window->display->device->shape_driver.SetWindowShape(window->shaper,shape,shapeMode); window->shaper->hasshape = SDL_TRUE; if((window->shaper->usershownflag & SDL_WINDOW_SHOWN) == SDL_WINDOW_SHOWN) {