[Spice-devel] [spice-gtk PATCH 4/4 v4] ppc: Fix spicy-screenshot colors on BE machines
Pavel Grunt
pgrunt at redhat.com
Thu Dec 17 08:43:49 PST 2015
Acked-by: Pavel Grunt <pgrunt at redhat.com>
Pavel
On Thu, 2015-12-17 at 16:50 +0100, Lukas Venhoda wrote:
> 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 at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/spice-devel
More information about the Spice-devel
mailing list