1
0
Fork 0
forked from len0rd/rockbox

Sansa clip zip: fix colours of icons, logos, album art

* configure display for RGB (instead of BGR) colour coding
* fix logo bitmap to correct size of 96x30
* fix pixel format to RGB565 swapped

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30859 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Bertrik Sikken 2011-10-29 22:36:47 +00:00
parent 4cab9f26b6
commit 94fc46b730
3 changed files with 3 additions and 3 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.6 KiB

After

Width:  |  Height:  |  Size: 8.5 KiB

Before After
Before After

View file

@ -54,7 +54,7 @@
#define LCD_WIDTH 96 #define LCD_WIDTH 96
#define LCD_HEIGHT 96 #define LCD_HEIGHT 96
#define LCD_DEPTH 16 /* 65536 colours */ #define LCD_DEPTH 16 /* 65536 colours */
#define LCD_PIXELFORMAT RGB565 #define LCD_PIXELFORMAT RGB565SWAPPED
/* define this if you have LCD enable function */ /* define this if you have LCD enable function */
#define HAVE_LCD_ENABLE #define HAVE_LCD_ENABLE

View file

@ -185,7 +185,7 @@ static void lcd_init_type1(void)
lcd_write_dat(0x03); lcd_write_dat(0x03);
lcd_write_cmd(0x05); lcd_write_cmd(0x05);
lcd_write_dat(0x08); lcd_write_dat(0x00); /* 0x08 results in BGR colour */
lcd_write_cmd(0x06); lcd_write_cmd(0x06);
lcd_write_dat(0x00); lcd_write_dat(0x00);
@ -403,8 +403,8 @@ void lcd_update_rect(int x, int y, int width, int height)
ptr = &lcd_framebuffer[row][x]; ptr = &lcd_framebuffer[row][x];
for (col = x; col < x_end; col++) { for (col = x; col < x_end; col++) {
pixel = *ptr++; pixel = *ptr++;
lcd_write_dat((pixel >> 8) & 0xFF);
lcd_write_dat((pixel >> 0) & 0xFF); lcd_write_dat((pixel >> 0) & 0xFF);
lcd_write_dat((pixel >> 8) & 0xFF);
} }
} }
} }