unify naming in ui_*

This commit is contained in:
Gwenhael Le Moine 2023-12-21 14:28:59 +01:00
parent b4dddbd542
commit 194b8d6ab9
No known key found for this signature in database
GPG key ID: FDFE3669426707A7
3 changed files with 14 additions and 14 deletions

View file

@ -1683,19 +1683,19 @@ static inline void draw_nibble( int col, int row, int val )
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;
draw_nibble( i, row, v );
lcd_nibbles_buffer[ row ][ i ] = nibble;
draw_nibble( i, row, nibble );
}
}

View file

@ -528,7 +528,6 @@ int text_get_event( void ) { return ncurses_get_event(); }
void text_adjust_contrast() { text_update_LCD(); }
/* TODO: not specific to tui */
void text_update_LCD( void )
{
if ( display.on ) {
@ -562,6 +561,7 @@ void text_update_LCD( void )
} else
memset( lcd_nibbles_buffer, 0xf0, sizeof( lcd_nibbles_buffer ) );
/* text UI specific from here */
if ( small )
ncurses_draw_lcd_small();
else if ( tiny )

View file

@ -2911,19 +2911,19 @@ static inline void draw_nibble( int c, int r, int val )
static inline void draw_row( long addr, int row )
{
int i, v;
int line_length;
int nibble;
int line_length = NIBBLES_PER_ROW;
line_length = NIBBLES_PER_ROW;
if ( ( display.offset > 3 ) && ( row <= display.lines ) )
line_length += 2;
for ( i = 0; i < line_length; i++ ) {
v = read_nibble( addr + i );
if ( v == lcd_nibbles_buffer[ row ][ i ] )
for ( int i = 0; i < line_length; i++ ) {
nibble = read_nibble( addr + i );
if ( nibble == lcd_nibbles_buffer[ row ][ i ] )
continue;
lcd_nibbles_buffer[ row ][ i ] = v;
draw_nibble( i, row, v );
lcd_nibbles_buffer[ row ][ i ] = nibble;
draw_nibble( i, row, nibble );
}
}