optimization of output was ruining display effects
This commit is contained in:
@@ -252,6 +252,8 @@ cell_t undefined_cell;
|
||||
|
||||
static boolean buffer_flipping_initialized = FALSE;
|
||||
|
||||
boolean do_immediate_flips = FALSE;
|
||||
|
||||
static void check_buffer_size(int width, int height);
|
||||
static cell_t * buffer_get_cell(console_buffer_t * buffer, int x, int y);
|
||||
|
||||
@@ -367,12 +369,18 @@ static void buffer_fill_to_end(console_buffer_t * buffer, cell_t * src,
|
||||
cell_t * sentinel = buffer_get_cell(buffer, 0, buffer_height);
|
||||
while (dst != sentinel)
|
||||
*dst++ = clear_cell;
|
||||
|
||||
if (do_immediate_flips && buffer == &back_buffer)
|
||||
back_buffer_flip();
|
||||
}
|
||||
|
||||
static void back_buffer_write(cell_t * cell, int x, int y)
|
||||
{
|
||||
cell_t * dst = buffer_get_cell(&back_buffer, x, y);
|
||||
*dst = *cell;
|
||||
|
||||
if (do_immediate_flips)
|
||||
back_buffer_flip();
|
||||
}
|
||||
|
||||
static void back_buffer_clear_to_end_of_line(int x, int y)
|
||||
@@ -384,6 +392,9 @@ static void back_buffer_clear_to_end_of_line(int x, int y)
|
||||
sentinel = buffer_get_cell(&back_buffer, 0, y+1);
|
||||
while (cell != sentinel)
|
||||
*cell++ = clear_cell;
|
||||
|
||||
if (do_immediate_flips)
|
||||
back_buffer_flip();
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -922,6 +933,7 @@ tty_delay_output()
|
||||
int k;
|
||||
|
||||
goal = 50 + clock();
|
||||
back_buffer_flip();
|
||||
while (goal > clock()) {
|
||||
k = junk; /* Do nothing */
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user