Browse Source

Make conio_refresh() play nicer with the resources when the machine is slow.

tags/v0.99.beta17
Sam Hocevar sam 15 years ago
parent
commit
3efac2753f
1 changed files with 3 additions and 2 deletions
  1. +3
    -2
      caca/caca_conio.c

+ 3
- 2
caca/caca_conio.c View File

@@ -64,7 +64,7 @@ void caca_conio_clreol(void)

/* FIXME: must work within the currently active text window */
caca_fill_box(cv, caca_wherex(cv), caca_wherey(cv),
caca_get_width(cv), caca_wherey(cv), ' ');
caca_get_canvas_width(cv), caca_wherey(cv), ' ');

conio_refresh();
}
@@ -492,8 +492,9 @@ static void conio_refresh(void)
refresh_ticks += _caca_getticks(&refresh_timer);
if(refresh_ticks > 10000)
{
refresh_ticks -= 10000;
caca_refresh_display(dp);
_caca_getticks(&refresh_timer);
refresh_ticks = 0;
}
}



Loading…
Cancel
Save