summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Chapman <dave@dchapman.com>2006-02-27 19:14:49 +0000
committerDave Chapman <dave@dchapman.com>2006-02-27 19:14:49 +0000
commit4b5b8b5965f8814bbb40399610da5b1b275a4e12 (patch)
treec40690295b62f4b1a9fec36b434d3b2214140d7d
parent569c83927dbee7f3c534023dfa122e59e64bcbf8 (diff)
downloadrockbox-4b5b8b5965f8814bbb40399610da5b1b275a4e12.tar.gz
rockbox-4b5b8b5965f8814bbb40399610da5b1b275a4e12.zip
Correctly byte-swap the pixel values for the iPod 4G Color and Nano - this fixes the colours for those players
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8860 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--apps/plugins/rockboy/lcd.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/apps/plugins/rockboy/lcd.c b/apps/plugins/rockboy/lcd.c
index c1a7a87b6b..4fb4dd2dc0 100644
--- a/apps/plugins/rockboy/lcd.c
+++ b/apps/plugins/rockboy/lcd.c
@@ -1090,7 +1090,13 @@ static void updatepalette(int i)
r = (r >> fb.cc[0].r) << fb.cc[0].l;
g = (g >> fb.cc[1].r) << fb.cc[1].l;
b = (b >> fb.cc[2].r) << fb.cc[2].l;
+
+#if LCD_PIXELFORMAT == RGB565
c = r|g|b;
+#elif LCD_PIXELFORMAT == RGB565SWAPPED
+ c = swap16(r|g|b);
+#endif
+
switch (fb.pelsize)
{