Re: [spice-gtk PATCH 4/4 v4] ppc: Fix spicy-screenshot colors on BE machines

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Acked-by: Pavel Grunt <pgrunt@xxxxxxxxxx>

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@xxxxxxxxxxxxxxxxxxxxx
> http://lists.freedesktop.org/mailman/listinfo/spice-devel
_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]