Skip to content

xcb/x11: fix byte order for 24/32 depths

Jeffrey Knockel requested to merge jeffk/vlc:x11-fix-byte-order into master

Previously the client used the wrong byte order for 24/32 bit color depths when the X server was little-endian (including when the client was little-endian) causing colors in rendered output to be mixed up. With the proposed changes, we check the server's endianness and select a byte order appropriately based on the server's endianness. This was already being done for 16/15 bit color depths, and so no change is required for those depths. I've tested these changes with every possible combination of client/server endianness (BE/BE, BE/LE, LE/BE, LE/LE), and colors appear to be rendered correctly in each case now.

Merge request reports