mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-13 18:17:39 -04:00
make the plugin API frambuffer agnostic
Change-Id: I5abdc231093054c517ff53b9a456997e440e3f6e
This commit is contained in:
parent
5d5f8169b5
commit
12f3ed1699
25 changed files with 92 additions and 93 deletions
|
@ -776,12 +776,12 @@ bool aliens_down, aliens_right, hit_left_border, hit_right_border;
|
|||
#if defined(LCD_STRIDEFORMAT) && LCD_STRIDEFORMAT == VERTICAL_STRIDE
|
||||
static inline fb_data get_pixel(int x, int y)
|
||||
{
|
||||
return rb->lcd_framebuffer[x*LCD_HEIGHT+y];
|
||||
return *rb->lcd_framebuffer[x*LCD_HEIGHT+y];
|
||||
}
|
||||
#else
|
||||
static inline fb_data get_pixel(int x, int y)
|
||||
{
|
||||
return rb->lcd_framebuffer[ytab[y] + x];
|
||||
return *rb->lcd_framebuffer[ytab[y] + x];
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -794,7 +794,7 @@ static const unsigned char shifts[4] = {
|
|||
/* Horizontal packing */
|
||||
static inline fb_data get_pixel(int x, int y)
|
||||
{
|
||||
return (rb->lcd_framebuffer[ytab[y] + (x >> 2)] >> shifts[x & 3]) & 3;
|
||||
return (*rb->lcd_framebuffer[ytab[y] + (x >> 2)] >> shifts[x & 3]) & 3;
|
||||
}
|
||||
#else
|
||||
/* Vertical packing */
|
||||
|
@ -803,7 +803,7 @@ static const unsigned char shifts[4] = {
|
|||
};
|
||||
static inline fb_data get_pixel(int x, int y)
|
||||
{
|
||||
return (rb->lcd_framebuffer[ytab[y] + x] >> shifts[y & 3]) & 3;
|
||||
return (*rb->lcd_framebuffer[ytab[y] + x] >> shifts[y & 3]) & 3;
|
||||
}
|
||||
#endif /* Horizontal/Vertical packing */
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue