forked from len0rd/rockbox
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
|
@ -639,7 +639,7 @@ SDL_Surface *ROCKBOX_SetVideoMode(_THIS, SDL_Surface *current,
|
|||
this->hidden->w = current->w = width;
|
||||
this->hidden->h = current->h = height;
|
||||
current->pitch = current->w * (bpp / 8);
|
||||
current->pixels = this->hidden->direct ? rb->lcd_framebuffer : this->hidden->buffer;
|
||||
current->pixels = this->hidden->direct ? *rb->lcd_framebuffer : this->hidden->buffer;
|
||||
|
||||
/* We're done */
|
||||
return(current);
|
||||
|
@ -674,7 +674,7 @@ static void flip_pixels(int x, int y, int w, int h)
|
|||
for(int x_0 = x; x_0 < x + w; ++x_0)
|
||||
{
|
||||
/* swap pixels directly in the framebuffer */
|
||||
rb->lcd_framebuffer[y_0 * LCD_WIDTH + x_0] = swap16(rb->lcd_framebuffer[y_0 * LCD_WIDTH + x_0]);
|
||||
*rb->lcd_framebuffer[y_0 * LCD_WIDTH + x_0] = swap16(*rb->lcd_framebuffer[y_0 * LCD_WIDTH + x_0]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -684,7 +684,7 @@ static void blit_rotated(fb_data *src, int x, int y, int w, int h)
|
|||
{
|
||||
for(int y_0 = y; y_0 < y + h; ++y_0)
|
||||
for(int x_0 = x; x_0 < x + w; ++x_0)
|
||||
rb->lcd_framebuffer[x_0 * LCD_WIDTH + y_0] = src[(LCD_WIDTH - y_0) * LCD_HEIGHT + x_0];
|
||||
*rb->lcd_framebuffer[x_0 * LCD_WIDTH + y_0] = src[(LCD_WIDTH - y_0) * LCD_HEIGHT + x_0];
|
||||
}
|
||||
|
||||
static void ROCKBOX_UpdateRects(_THIS, int numrects, SDL_Rect *rects)
|
||||
|
@ -720,7 +720,7 @@ static void ROCKBOX_UpdateRects(_THIS, int numrects, SDL_Rect *rects)
|
|||
|
||||
out_bmp.width = LCD_WIDTH;
|
||||
out_bmp.height = LCD_HEIGHT;
|
||||
out_bmp.data = (char*)rb->lcd_framebuffer;
|
||||
out_bmp.data = (char*)*rb->lcd_framebuffer;
|
||||
simple_resize_bitmap(&in_bmp, &out_bmp);
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue