Alexandre Julliard : winex11: Check the bpp instead of the depth in the R8G8B8 format test.

Alexandre Julliard julliard at winehq.org
Thu Jan 17 14:48:50 CST 2013


Module: wine
Branch: master
Commit: ae0ae4b9bae40ffb7f9e1963c1ed1d1764019317
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=ae0ae4b9bae40ffb7f9e1963c1ed1d1764019317

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Thu Jan 17 14:36:51 2013 +0100

winex11: Check the bpp instead of the depth in the R8G8B8 format test.

---

 dlls/winex11.drv/bitblt.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/dlls/winex11.drv/bitblt.c b/dlls/winex11.drv/bitblt.c
index 84e8751..e91ca75 100644
--- a/dlls/winex11.drv/bitblt.c
+++ b/dlls/winex11.drv/bitblt.c
@@ -1042,7 +1042,8 @@ static BOOL matching_color_info( const XVisualInfo *vis, const BITMAPINFO *info
 
 static inline BOOL is_r8g8b8( const XVisualInfo *vis )
 {
-    return vis->depth == 24 && vis->red_mask == 0xff0000 && vis->blue_mask == 0x0000ff;
+    const XPixmapFormatValues *format = pixmap_formats[vis->depth];
+    return format->bits_per_pixel == 24 && vis->red_mask == 0xff0000 && vis->blue_mask == 0x0000ff;
 }
 
 static inline BOOL image_needs_byteswap( XImage *image, BOOL is_r8g8b8, int bit_count )




More information about the wine-cvs mailing list