diff options
Diffstat (limited to 'apps/plugins/rockboy/sys_rockbox.c')
-rw-r--r-- | apps/plugins/rockboy/sys_rockbox.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/apps/plugins/rockboy/sys_rockbox.c b/apps/plugins/rockboy/sys_rockbox.c index 1cce81478b..9f6b588b47 100644 --- a/apps/plugins/rockboy/sys_rockbox.c +++ b/apps/plugins/rockboy/sys_rockbox.c | |||
@@ -236,9 +236,22 @@ void vid_update(int scanline) | |||
236 | #else /* LCD_HEIGHT != 64, iRiver */ | 236 | #else /* LCD_HEIGHT != 64, iRiver */ |
237 | if (fb.mode==1) | 237 | if (fb.mode==1) |
238 | scanline-=16; | 238 | scanline-=16; |
239 | #ifdef GRAYSCALE | ||
240 | scanline_remapped = scanline / 4; | ||
241 | #else | ||
239 | scanline_remapped = scanline / 8; | 242 | scanline_remapped = scanline / 8; |
243 | #endif | ||
240 | frameb = rb->lcd_framebuffer + scanline_remapped * LCD_WIDTH; | 244 | frameb = rb->lcd_framebuffer + scanline_remapped * LCD_WIDTH; |
241 | while (cnt < 160) { | 245 | while (cnt < 160) { |
246 | #ifdef GRAYSCALE | ||
247 | *(frameb++) = (scan.buf[0][cnt]&0x3) | | ||
248 | ((scan.buf[1][cnt]&0x3)<<2) | | ||
249 | ((scan.buf[2][cnt]&0x3)<<4) | | ||
250 | ((scan.buf[3][cnt]&0x3)<<6); | ||
251 | cnt++; | ||
252 | } | ||
253 | rb->lcd_update_rect(0, scanline & ~3, LCD_WIDTH, 4); //8); | ||
254 | #else | ||
242 | register unsigned scrbyte = 0; | 255 | register unsigned scrbyte = 0; |
243 | if (scan.buf[0][cnt] & 0x02) scrbyte |= 0x01; | 256 | if (scan.buf[0][cnt] & 0x02) scrbyte |= 0x01; |
244 | if (scan.buf[1][cnt] & 0x02) scrbyte |= 0x02; | 257 | if (scan.buf[1][cnt] & 0x02) scrbyte |= 0x02; |
@@ -252,7 +265,8 @@ void vid_update(int scanline) | |||
252 | cnt++; | 265 | cnt++; |
253 | } | 266 | } |
254 | rb->lcd_update_rect(0, scanline & ~7, LCD_WIDTH, 8); | 267 | rb->lcd_update_rect(0, scanline & ~7, LCD_WIDTH, 8); |
255 | #endif | 268 | #endif /* GRAYSCALE */ |
269 | #endif /* LCD_HEIGHT */ | ||
256 | } | 270 | } |
257 | 271 | ||
258 | void vid_end(void) | 272 | void vid_end(void) |