fiddling and naming

This commit is contained in:
Gwenhael Le Moine 2023-09-27 15:01:34 +02:00
parent 5f2d935462
commit 8d0c1eb7f3
No known key found for this signature in database
GPG key ID: FDFE3669426707A7
2 changed files with 10 additions and 11 deletions

View file

@ -1951,12 +1951,12 @@ void sdl_init_LCD( void )
void sdl_update_LCD( void )
{
int i;
long addr;
static int old_offset = -1;
static int old_lines = -1;
if ( display.on ) {
int i;
long addr;
static int old_offset = -1;
static int old_lines = -1;
addr = display.disp_start;
if ( display.offset != old_offset ) {
memset( lcd_nibbles_buffer, 0xf0, ( size_t )( ( display.lines + 1 ) * NIBS_PER_BUFFER_ROW ) );

View file

@ -340,18 +340,18 @@ static inline void ncurses_init_ui( void )
/* TODO: not specific to tui */
static inline void draw_row( long addr, int row )
{
int v;
int nibble;
int line_length = NIBBLES_PER_ROW;
if ( ( display.offset > 3 ) && ( row <= display.lines ) )
line_length += 2;
for ( int i = 0; i < line_length; i++ ) {
v = read_nibble( addr + i );
if ( v == lcd_nibbles_buffer[ row ][ i ] )
nibble = read_nibble( addr + i );
if ( nibble == lcd_nibbles_buffer[ row ][ i ] )
continue;
lcd_nibbles_buffer[ row ][ i ] = v;
lcd_nibbles_buffer[ row ][ i ] = nibble;
}
}
@ -401,9 +401,8 @@ void text_update_LCD( void )
addr += NIBBLES_PER_ROW;
}
}
} else {
} else
memset( lcd_nibbles_buffer, 0xf0, sizeof( lcd_nibbles_buffer ) );
}
ncurses_draw_lcd();
}