diff options
author | Lukas Venhoda <lvenhoda@redhat.com> | 2015-12-17 16:50:19 +0100 |
---|---|---|
committer | Pavel Grunt <pgrunt@redhat.com> | 2015-12-21 18:24:40 +0100 |
commit | f1e504f02baea94b223e3cde90da0c2a5e2f7403 (patch) | |
tree | 198b847d48ff8ac4542ba7d4f613181c5fe9892a | |
parent | 756f756c8aae1814fd8f36e08df44b85ffb63574 (diff) |
ppc: Fix spicy-screenshot colors on BE machines
Save screenshot in proper endianess
xRGB on LE machine and BGRx on BE machine
Acked-by: Pavel Grunt <pgrunt@redhat.com>
-rw-r--r-- | src/spicy-screenshot.c | 6 |
1 files changed, 6 insertions, 0 deletions
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--; } |