@@ -137,7 +137,7 @@ static void write_text( int x, int y, const char* string, unsigned int length, u
137
137
}
138
138
}
139
139
140
- static void colors_setup ( color_t * colors )
140
+ static void colors_setup ( void )
141
141
{
142
142
int r , g , b ;
143
143
// Adjust the LCD color according to the contrast
@@ -149,25 +149,25 @@ static void colors_setup( color_t* colors )
149
149
150
150
for ( unsigned i = FIRST_COLOR ; i < LAST_COLOR ; i ++ ) {
151
151
if ( config .mono ) {
152
- r = colors [ i ].mono_rgb ;
153
- g = colors [ i ].mono_rgb ;
154
- b = colors [ i ].mono_rgb ;
152
+ r = COLORS [ i ].mono_rgb ;
153
+ g = COLORS [ i ].mono_rgb ;
154
+ b = COLORS [ i ].mono_rgb ;
155
155
} else if ( config .gray ) {
156
- r = colors [ i ].gray_rgb ;
157
- g = colors [ i ].gray_rgb ;
158
- b = colors [ i ].gray_rgb ;
156
+ r = COLORS [ i ].gray_rgb ;
157
+ g = COLORS [ i ].gray_rgb ;
158
+ b = COLORS [ i ].gray_rgb ;
159
159
} else {
160
- r = colors [ i ].r ;
161
- g = colors [ i ].g ;
162
- b = colors [ i ].b ;
160
+ r = COLORS [ i ].r ;
161
+ g = COLORS [ i ].g ;
162
+ b = COLORS [ i ].b ;
163
163
}
164
164
165
165
ARGBColors [ i ] = 0xff000000 | ( r << 16 ) | ( g << 8 ) | b ;
166
166
}
167
167
168
- r = ( 0x13 - contrast ) * ( colors [ LCD ].r / 0x10 );
169
- g = ( 0x13 - contrast ) * ( colors [ LCD ].g / 0x10 );
170
- b = 128 - ( ( 0x13 - contrast ) * ( ( 128 - colors [ LCD ].b ) / 0x10 ) );
168
+ r = ( 0x13 - contrast ) * ( COLORS [ LCD ].r / 0x10 );
169
+ g = ( 0x13 - contrast ) * ( COLORS [ LCD ].g / 0x10 );
170
+ b = 128 - ( ( 0x13 - contrast ) * ( ( 128 - COLORS [ LCD ].b ) / 0x10 ) );
171
171
ARGBColors [ PIXEL ] = 0xff000000 | ( r << 16 ) | ( g << 8 ) | b ;
172
172
}
173
173
@@ -1355,11 +1355,10 @@ void sdl_update_LCD( void )
1355
1355
{
1356
1356
if ( display .on ) {
1357
1357
int i ;
1358
- long addr ;
1358
+ long addr = display . disp_start ;
1359
1359
static int old_offset = -1 ;
1360
1360
static int old_lines = -1 ;
1361
1361
1362
- addr = display .disp_start ;
1363
1362
if ( display .offset != old_offset ) {
1364
1363
memset ( lcd_nibbles_buffer , 0xf0 , ( size_t )( ( display .lines + 1 ) * NIBS_PER_BUFFER_ROW ) );
1365
1364
old_offset = display .offset ;
@@ -1453,7 +1452,7 @@ void sdl_draw_annunc( void )
1453
1452
1454
1453
void sdl_adjust_contrast ( void )
1455
1454
{
1456
- colors_setup ( opt_gx ? colors_gx : colors_sx );
1455
+ colors_setup ();
1457
1456
create_annunc ();
1458
1457
1459
1458
// redraw LCD
@@ -1534,7 +1533,7 @@ void init_sdl_ui( int argc, char** argv )
1534
1533
1535
1534
/* BUTTONS = opt_gx ? BUTTONS_gx : BUTTONS_sx; */
1536
1535
1537
- colors_setup ( COLORS );
1536
+ colors_setup ();
1538
1537
1539
1538
if ( !config .hide_chrome ) {
1540
1539
int cut = BUTTONS [ HPKEY_MTH ].y + KEYBOARD_OFFSET_Y - 19 ;
0 commit comments