summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tools/virtual.c24
1 files changed, 16 insertions, 8 deletions
diff --git a/tools/virtual.c b/tools/virtual.c
index 160d6a1d..226f86d4 100644
--- a/tools/virtual.c
+++ b/tools/virtual.c
@@ -1456,15 +1456,23 @@ static int record_mouse(struct context *ctx)
static int bad_visual(Visual *visual, int depth)
{
+ DBG(("%s? depth=%d, visual: bits_per_rgb=%d, red_mask=%08x, green_mask=%08x, blue_mask=%08\n",
+ __func__, depth,
+ visual->bits_per_rgb,
+ visual->red_mask,
+ visual->green_mask,
+ visual->blue_mask));
switch (depth) {
- case 16: return (visual->bits_per_rgb != 6 ||
- visual->red_mask != 0x1f << 11 ||
- visual->green_mask != 0x3f << 5 ||
- visual->blue_mask != 0x1f << 0);
- case 24: return (visual->bits_per_rgb != 8 ||
- visual->red_mask != 0xff << 16 ||
- visual->green_mask != 0xff << 8 ||
- visual->blue_mask != 0xff << 0);
+ case 16: return (visual->bits_per_rgb != 6 ||
+ visual->red_mask != 0x1f << 11 ||
+ visual->green_mask != 0x3f << 5 ||
+ visual->blue_mask != 0x1f << 0);
+
+ case 24: return (visual->bits_per_rgb != 8 ||
+ visual->red_mask != 0xff << 16 ||
+ visual->green_mask != 0xff << 8 ||
+ visual->blue_mask != 0xff << 0);
+
default: return 0;
}
}