summaryrefslogtreecommitdiff
path: root/firmware/target/arm/s3c2440/gigabeat-fx
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/target/arm/s3c2440/gigabeat-fx')
-rw-r--r--firmware/target/arm/s3c2440/gigabeat-fx/lcd-meg-fx.c21
1 files changed, 11 insertions, 10 deletions
diff --git a/firmware/target/arm/s3c2440/gigabeat-fx/lcd-meg-fx.c b/firmware/target/arm/s3c2440/gigabeat-fx/lcd-meg-fx.c
index 62880790d1..d9a28d152f 100644
--- a/firmware/target/arm/s3c2440/gigabeat-fx/lcd-meg-fx.c
+++ b/firmware/target/arm/s3c2440/gigabeat-fx/lcd-meg-fx.c
@@ -246,22 +246,23 @@ void lcd_init_device(void)
246{ 246{
247#ifdef BOOTLOADER 247#ifdef BOOTLOADER
248 int i; 248 int i;
249 /* When the Rockbox bootloader starts, we are changing framebuffer address, 249 /* When the Rockbox bootloader starts the framebuffer address is changed
250 but we don't want what's shown on the LCD to change until we do an 250 * but the LCD display should stay the same til an lcd_update() occurs.
251 lcd_update(), so copy the data from the old framebuffer to the new one */ 251 * This copies the data from the old framebuffer to the new one to make the
252 unsigned short *buf = (unsigned short*)FRAME; 252 * change non-visable to the user.
253 253 */
254 memcpy(FRAME, (short *)((LCDSADDR1)<<1), 320*240*2); 254 unsigned short *buf = (unsigned short*)(FRAME);
255 unsigned short *oldbuf = (unsigned short*)(LCDSADDR1<<1);
255 256
256 /* The Rockbox bootloader is transitioning from RGB555I to RGB565 mode 257 /* The Rockbox bootloader is transitioning from RGB555I to RGB565 mode
257 so convert the frambuffer data accordingly */ 258 so convert the frambuffer data accordingly */
258 for(i=0; i< 320*240; i++){ 259 for(i=0; i< 320*240; i++)
259 *buf = ((*buf>>1) & 0x1F) | (*buf & 0xffc0); 260 {
260 buf++; 261 *(buf++) = ((*oldbuf>>1) & 0x1F) | (*oldbuf & 0xffc0);
262 oldbuf++;
261 } 263 }
262#endif 264#endif
263 265
264
265 /* Set pins up */ 266 /* Set pins up */
266 267
267 GPHUP &= 0x600; 268 GPHUP &= 0x600;