1
0
Fork 0
forked from len0rd/rockbox

Make lcd_enable more tolerant of multiple calls

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11943 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Greg White 2007-01-08 02:31:12 +00:00
parent 8cce37f161
commit 5693622cd4

View file

@ -52,7 +52,8 @@ void lcd_update_rect(int x, int y, int width, int height)
if(!lcd_on)
{
yield();
for(x=0; x < 2; x++)
yield();
return;
}
if (use_dma_blit)
@ -95,15 +96,14 @@ void lcd_update_rect(int x, int y, int width, int height)
void lcd_enable(bool state)
{
if(state) {
if(lcd_poweroff) {
if(!lcd_on)
memcpy(FRAME, lcd_framebuffer, LCD_WIDTH*LCD_HEIGHT*2);
if(lcd_poweroff && !lcd_on) {
memcpy(FRAME, lcd_framebuffer, LCD_WIDTH*LCD_HEIGHT*2);
lcd_on = true;
LCDCON1 |= 1;
}
}
else {
if(lcd_poweroff) {
if(lcd_poweroff && lcd_on) {
lcd_on = false;
LCDCON1 &= ~1;
}
@ -135,6 +135,11 @@ void lcd_clear_display_dma(void)
void *src;
bool inc = false;
if(!lcd_on) {
yield();
yield();
}
if (lcd_get_drawmode() & DRMODE_INVERSEVID)
src = fg_pattern_blit;
else