Save screenshot in proper endianess xRGB on LE machine and BGRx on BE machine --- Changes since v3: - New patch --- src/spicy-screenshot.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/spicy-screenshot.c b/src/spicy-screenshot.c index d90d4e8..63666d6 100644 --- a/src/spicy-screenshot.c +++ b/src/spicy-screenshot.c @@ -63,9 +63,15 @@ static int write_ppm_32(void) n = d_width * d_height; p = d_data; while (n > 0) { +#ifdef WORDS_BIGENDIAN + fputc(p[1], fp); + fputc(p[2], fp); + fputc(p[3], fp); +#else fputc(p[2], fp); fputc(p[1], fp); fputc(p[0], fp); +#endif p += 4; n--; } -- 2.5.0 _______________________________________________ Spice-devel mailing list Spice-devel@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/spice-devel