It appears some VNC servers reports incorrect masks in their visuals.
This patch recognizes this unlikely set of masks and interprets it as
RGB16 which VNC expects.
Task-number: QTBUG-44147
Change-Id: Ia374edcd5f0a5ce0188157ac1d328f888cfa260c
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
break;
}
qWarning("Unsupported screen format: depth: %d, red_mask: %x, blue_mask: %x", depth, red_mask, blue_mask);
+
+ switch (depth) {
+ case 24:
+ qWarning("Using RGB32 fallback, if this works your X11 server is reporting a bad screen format.");
+ return QImage::Format_RGB32;
+ case 16:
+ qWarning("Using RGB16 fallback, if this works your X11 server is reporting a bad screen format.");
+ return QImage::Format_RGB16;
+ default:
+ break;
+ }
+
return QImage::Format_Invalid;
}