summaryrefslogtreecommitdiff
path: root/firmware
diff options
context:
space:
mode:
Diffstat (limited to 'firmware')
-rw-r--r--firmware/drivers/lcd-recorder.c16
-rw-r--r--firmware/font.c14
2 files changed, 15 insertions, 15 deletions
diff --git a/firmware/drivers/lcd-recorder.c b/firmware/drivers/lcd-recorder.c
index c174430c83..99887b5dfc 100644
--- a/firmware/drivers/lcd-recorder.c
+++ b/firmware/drivers/lcd-recorder.c
@@ -476,13 +476,13 @@ void lcd_bitmap (unsigned char *src, int x, int y, int nx, int ny,
476 476
477 if (!shift && clear) /* shortcut for byte aligned match with clear */ 477 if (!shift && clear) /* shortcut for byte aligned match with clear */
478 { 478 {
479 while (ny >= 8) /* all full rows */ 479 while (ny >= 8) /* all full rows */
480 { 480 {
481 memcpy(dst, src, nx); 481 memcpy(dst, src, nx);
482 src += stride; 482 src += stride;
483 dst += LCD_WIDTH; 483 dst += LCD_WIDTH;
484 ny -= 8; 484 ny -= 8;
485 } 485 }
486 if (ny == 0) /* nothing left to do? */ 486 if (ny == 0) /* nothing left to do? */
487 return; 487 return;
488 /* last partial row to do by default routine */ 488 /* last partial row to do by default routine */
@@ -506,8 +506,8 @@ void lcd_bitmap (unsigned char *src, int x, int y, int nx, int ny,
506 /* Loop for each column */ 506 /* Loop for each column */
507 for (x = 0; x < nx; x++) 507 for (x = 0; x < nx; x++)
508 { 508 {
509 src_col = src++; 509 src_col = src++;
510 dst_col = dst++; 510 dst_col = dst++;
511 data = 0; 511 data = 0;
512 y = 0; 512 y = 0;
513 513
diff --git a/firmware/font.c b/firmware/font.c
index 7c83923904..f9453d5bac 100644
--- a/firmware/font.c
+++ b/firmware/font.c
@@ -238,7 +238,7 @@ struct font* font_load(char *path)
238 /* one-time rotate font bits to rockbox format*/ 238 /* one-time rotate font bits to rockbox format*/
239 rotate_font_bits(pf); 239 rotate_font_bits(pf);
240 240
241 return pf; /* success!*/ 241 return pf; /* success!*/
242} 242}
243 243
244/* 244/*
@@ -309,7 +309,7 @@ static void rotleft(unsigned char *dst, bitmap_t *src, unsigned int width,
309 unsigned int height) 309 unsigned int height)
310{ 310{
311 unsigned int i,j; 311 unsigned int i,j;
312 unsigned int src_words; /* # words of input image*/ 312 unsigned int src_words; /* # words of input image*/
313 unsigned int dst_mask; /* bit mask for destination */ 313 unsigned int dst_mask; /* bit mask for destination */
314 bitmap_t src_mask; /* bit mask for source */ 314 bitmap_t src_mask; /* bit mask for source */
315 315
@@ -331,21 +331,21 @@ static void rotleft(unsigned char *dst, bitmap_t *src, unsigned int width,
331 331
332 /* if set in input, set in rotated output */ 332 /* if set in input, set in rotated output */
333 if (src[i] & src_mask) 333 if (src[i] & src_mask)
334 dst[j] |= dst_mask; 334 dst[j] |= dst_mask;
335 335
336 src_mask >>= 1; /* next input bit */ 336 src_mask >>= 1; /* next input bit */
337 if (src_mask == 0) /* input word done? */ 337 if (src_mask == 0) /* input word done? */
338 { 338 {
339 src_mask = 1 << (sizeof (bitmap_t) * 8 - 1); 339 src_mask = 1 << (sizeof (bitmap_t) * 8 - 1);
340 i++; /* next input word */ 340 i++; /* next input word */
341 } 341 }
342 } 342 }
343 343
344 dst_mask <<= 1; /* next output bit (row) */ 344 dst_mask <<= 1; /* next output bit (row) */
345 if (dst_mask > (1 << 7)) /* output bit > 7? */ 345 if (dst_mask > (1 << 7)) /* output bit > 7? */
346 { 346 {
347 dst_mask = 1; 347 dst_mask = 1;
348 dst += width; /* next output byte row */ 348 dst += width; /* next output byte row */
349 } 349 }
350 } 350 }
351} 351}