Adapt Pacbox for the Sansa's LCD - it was using the ipod Nano display routine before.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13494 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
31df21c4f9
commit
1186c18c3a
2 changed files with 28 additions and 6 deletions
|
@ -89,10 +89,10 @@
|
|||
|
||||
#elif CONFIG_KEYPAD == SANSA_E200_PAD
|
||||
|
||||
#define PACMAN_UP BUTTON_RIGHT
|
||||
#define PACMAN_DOWN BUTTON_LEFT
|
||||
#define PACMAN_LEFT BUTTON_UP
|
||||
#define PACMAN_RIGHT BUTTON_DOWN
|
||||
#define PACMAN_UP BUTTON_UP
|
||||
#define PACMAN_DOWN BUTTON_DOWN
|
||||
#define PACMAN_LEFT BUTTON_LEFT
|
||||
#define PACMAN_RIGHT BUTTON_RIGHT
|
||||
#define PACMAN_1UP BUTTON_SELECT
|
||||
#define PACMAN_2UP BUTTON_REC
|
||||
#define PACMAN_COIN_PRE BUTTON_SELECT
|
||||
|
@ -129,6 +129,9 @@
|
|||
#elif (LCD_WIDTH >= 220)
|
||||
#define XOFS ((LCD_WIDTH-(288*3/4))/2)
|
||||
#define YOFS ((LCD_HEIGHT-(224*3/4))/2)
|
||||
#elif (LCD_WIDTH >= 168) && (LCD_HEIGHT >= 216)
|
||||
#define XOFS ((LCD_WIDTH-(224*3/4))/2)
|
||||
#define YOFS ((LCD_HEIGHT-(288*3/4))/2)
|
||||
#elif (LCD_WIDTH >= 144)
|
||||
#define XOFS ((LCD_WIDTH-288/2)/2)
|
||||
#define YOFS ((LCD_HEIGHT-224/2)/2)
|
||||
|
|
|
@ -56,7 +56,7 @@ void blit_display(fb_data* lcd_framebuffer, unsigned char* vbuf)
|
|||
}
|
||||
}
|
||||
#elif (LCD_WIDTH >= 216) && (LCD_HEIGHT >= 168)
|
||||
/* 0.75 scaling - display 3 out of 4 pixels = 216x168
|
||||
/* 0.75 scaling - display 3 out of 4 pixels - rotated = 216x168
|
||||
Skipping pixel #2 out of 4 seems to give the most legible display
|
||||
*/
|
||||
next_dst=&lcd_framebuffer[YOFS*LCD_WIDTH+XOFS+((ScreenHeight*3)/4)-1];
|
||||
|
@ -74,8 +74,27 @@ void blit_display(fb_data* lcd_framebuffer, unsigned char* vbuf)
|
|||
vbuf+=ScreenWidth;
|
||||
}
|
||||
}
|
||||
#elif (LCD_WIDTH >= 168) && (LCD_HEIGHT >= 216)
|
||||
/* 0.75 scaling - display 3 out of 4 pixels - = 168x216
|
||||
Skipping pixel #2 out of 4 seems to give the most legible display
|
||||
*/
|
||||
(void)next_dst;
|
||||
dst=&lcd_framebuffer[YOFS*LCD_WIDTH+XOFS];
|
||||
for (y=0;y<ScreenHeight;y++) {
|
||||
if ((y & 3) != 1) {
|
||||
for (x=0;x<ScreenWidth;x++) {
|
||||
if ((x & 3) == 1) { vbuf++; }
|
||||
else {
|
||||
*(dst++) = palette[*(vbuf++)];
|
||||
}
|
||||
}
|
||||
dst += XOFS*2;
|
||||
} else {
|
||||
vbuf+=ScreenWidth;
|
||||
}
|
||||
}
|
||||
#elif (LCD_WIDTH >= 144) && (LCD_HEIGHT >= 112)
|
||||
/* 0.5 scaling - display every other pixel = 144x112 */
|
||||
/* 0.5 scaling - display every other pixel - rotated = 144x112 */
|
||||
next_dst=&lcd_framebuffer[YOFS*LCD_WIDTH+XOFS+ScreenHeight/2-1];
|
||||
for (y=(ScreenHeight/2)-1;y >= 0; y--) {
|
||||
dst = (next_dst--);
|
||||
|
|
Loading…
Reference in a new issue