summaryrefslogtreecommitdiff
path: root/apps/plugins/pacbox/pacbox_lcd.c
diff options
context:
space:
mode:
authorMichael Sevakis <jethead71@rockbox.org>2011-01-25 19:28:40 +0000
committerMichael Sevakis <jethead71@rockbox.org>2011-01-25 19:28:40 +0000
commitd796ab6f61a4a336c53d6689750aa0eca118bbfd (patch)
treeb53af2fab5ad342f19b137cfa7c8c86c06fec839 /apps/plugins/pacbox/pacbox_lcd.c
parent81682e723a9294eec17bc74757fed3cc61a082b0 (diff)
Pacbox: Fix assumption about LCD width of 128 implying the display needs vertical clipping. No more screen garbage on sa9200.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29138 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins/pacbox/pacbox_lcd.c')
-rw-r--r--apps/plugins/pacbox/pacbox_lcd.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/apps/plugins/pacbox/pacbox_lcd.c b/apps/plugins/pacbox/pacbox_lcd.c
index 04bfe5f797..bc2de20858 100644
--- a/apps/plugins/pacbox/pacbox_lcd.c
+++ b/apps/plugins/pacbox/pacbox_lcd.c
@@ -106,11 +106,13 @@ void blit_display(fb_data* lcd_framebuffer, unsigned char* vbuf)
vbuf+=ScreenWidth;
}
#elif (LCD_WIDTH >= 128) && (LCD_HEIGHT >= 128)
- /* 0.5 scaling - display every other pixel = 112x144, crop to 112x128 */
+ /* 0.5 scaling - display every other pixel
+ * LCD_HEIGHT < 144: 112x144, crop to 112x128
+ * else center vertically without clipping */
(void)next_dst;
- dst=&lcd_framebuffer[XOFS];
+ dst=&lcd_framebuffer[YOFS*LCD_WIDTH+XOFS];
- /* Skip first 16 lines */
+ /* Skip first YCLIP lines */
vbuf+=ScreenWidth*YCLIP;
/* Show regular screen */