mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-11-09 13:12:37 -05:00
Agptek rocker: do not update display when not active
Change-Id: I963a9098b82a09aed8050123932a128f2d08dee0
This commit is contained in:
parent
2de2636d6b
commit
e85a3ba518
1 changed files with 23 additions and 17 deletions
|
|
@ -114,27 +114,33 @@ extern void lcd_copy_buffer_rect(fb_data *dst, const fb_data *src,
|
||||||
|
|
||||||
void lcd_update(void)
|
void lcd_update(void)
|
||||||
{
|
{
|
||||||
/* Copy the Rockbox framebuffer to the second framebuffer */
|
if (lcd_active())
|
||||||
lcd_copy_buffer_rect(LCD_FRAMEBUF_ADDR(0, 0), FBADDR(0,0),
|
{
|
||||||
LCD_WIDTH*LCD_HEIGHT, 1);
|
/* Copy the Rockbox framebuffer to the second framebuffer */
|
||||||
redraw();
|
lcd_copy_buffer_rect(LCD_FRAMEBUF_ADDR(0, 0), FBADDR(0,0),
|
||||||
|
LCD_WIDTH*LCD_HEIGHT, 1);
|
||||||
|
redraw();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void lcd_update_rect(int x, int y, int width, int height)
|
void lcd_update_rect(int x, int y, int width, int height)
|
||||||
{
|
{
|
||||||
fb_data *dst = LCD_FRAMEBUF_ADDR(x, y);
|
if (lcd_active())
|
||||||
fb_data * src = FBADDR(x,y);
|
{
|
||||||
|
fb_data *dst = LCD_FRAMEBUF_ADDR(x, y);
|
||||||
|
fb_data * src = FBADDR(x,y);
|
||||||
|
|
||||||
/* Copy part of the Rockbox framebuffer to the second framebuffer */
|
/* Copy part of the Rockbox framebuffer to the second framebuffer */
|
||||||
if (width < LCD_WIDTH)
|
if (width < LCD_WIDTH)
|
||||||
{
|
{
|
||||||
/* Not full width - do line-by-line */
|
/* Not full width - do line-by-line */
|
||||||
lcd_copy_buffer_rect(dst, src, width, height);
|
lcd_copy_buffer_rect(dst, src, width, height);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
/* Full width - copy as one line */
|
||||||
|
lcd_copy_buffer_rect(dst, src, LCD_WIDTH*height, 1);
|
||||||
|
}
|
||||||
|
redraw();
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
/* Full width - copy as one line */
|
|
||||||
lcd_copy_buffer_rect(dst, src, LCD_WIDTH*height, 1);
|
|
||||||
}
|
|
||||||
redraw();
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue