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
This commit is contained in:
parent
81682e723a
commit
d796ab6f61
2 changed files with 11 additions and 3 deletions
|
@ -293,7 +293,13 @@
|
|||
#define YOFS ((LCD_HEIGHT-224/2)/2)
|
||||
#elif (LCD_WIDTH >= 128)
|
||||
#define XOFS ((LCD_WIDTH-224/2)/2)
|
||||
#if LCD_HEIGHT < 144
|
||||
#define YCLIP ((288-2*LCD_HEIGHT)/2)
|
||||
#define YOFS 0
|
||||
#else
|
||||
#define YCLIP 0
|
||||
#define YOFS ((LCD_HEIGHT-288/2)/2)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* How many video frames (out of a possible 60) we display each second.
|
||||
|
|
|
@ -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 */
|
||||
|
|
Loading…
Reference in a new issue