Rockbox open source high quality audio player as a Music Player Daemon
mpris rockbox mpd libadwaita audio rust zig deno
2
fork

Configure Feed

Select the types of activity you want to include in your feed.

screen_access add set_drawinfo

Change-Id: I32e4932eb3a6f06d45aff2cd767484d254a1c9ff

authored by

William Wilgus and committed by
William Wilgus
e09b4665 b94b0d3b

+15 -24
+6 -18
apps/gui/color_picker.c
··· 119 119 #define SELECTOR_WIDTH get_icon_width(display->screen_type) 120 120 #define SELECTOR_HEIGHT 8 /* Height of > and < bitmaps */ 121 121 122 - /* dunno why lcd_set_drawinfo should be left out of struct screen */ 123 - static void set_drawinfo(struct screen *display, int mode, 124 - unsigned foreground, unsigned background) 125 - { 126 - display->set_drawmode(mode); 127 - if (display->depth > 1) 128 - { 129 - display->set_foreground(foreground); 130 - display->set_background(background); 131 - } 132 - } 133 - 134 122 /* Figure out widest label character in case they vary - 135 123 this function assumes labels are one character */ 136 124 static int label_get_max_width(struct screen *display) ··· 174 162 } 175 163 176 164 /* Draw title string */ 177 - set_drawinfo(display, DRMODE_SOLID, text_color, background_color); 165 + display->set_drawinfo(DRMODE_SOLID, text_color, background_color); 178 166 vp.flags |= VP_FLAG_ALIGN_CENTER; 179 167 display->putsxy(0, MARGIN_TOP, title); 180 168 ··· 212 200 213 201 if (i == row) 214 202 { 215 - set_drawinfo(display, DRMODE_SOLID, text_color, background_color); 203 + display->set_drawinfo(DRMODE_SOLID, text_color, background_color); 216 204 217 205 if (global_settings.cursor_style != 0) 218 206 { ··· 249 237 else if (!display_three_rows) 250 238 continue; 251 239 252 - set_drawinfo(display, mode, fg, bg); 240 + display->set_drawinfo(mode, fg, bg); 253 241 254 242 /* Draw label */ 255 243 vp.flags &= ~VP_FLAG_ALIGNMENT_MASK; ··· 294 282 display->fillrect(text_x, top, width, height); 295 283 296 284 /* Draw RGB: #rrggbb in middle of swatch */ 297 - set_drawinfo(display, DRMODE_FG, get_black_or_white(rgb), 285 + display->set_drawinfo(DRMODE_FG, get_black_or_white(rgb), 298 286 background_color); 299 287 /* Format RGB: #rrggbb */ 300 288 display->putsxyf(0, top + (height - char_height) / 2, 301 289 str(LANG_COLOR_RGB_VALUE), rgb->red, rgb->green, rgb->blue); 302 290 303 291 /* Draw border around the rect */ 304 - set_drawinfo(display, DRMODE_SOLID, text_color, background_color); 292 + display->set_drawinfo(DRMODE_SOLID, text_color, background_color); 305 293 display->drawrect(text_x, top, width, height); 306 294 } 307 295 } ··· 313 301 314 302 if (height >= char_height) 315 303 { 316 - set_drawinfo(display, DRMODE_SOLID, text_color, background_color); 304 + display->set_drawinfo(DRMODE_SOLID, text_color, background_color); 317 305 /* Format RGB: #rrggbb */ 318 306 display->putsxyf(0, top + (height - char_height) / 2, 319 307 str(LANG_COLOR_RGB_VALUE), rgb->red, rgb->green, rgb->blue);
+6 -6
apps/gui/line.c
··· 345 345 height*line->line); 346 346 break; 347 347 case STYLE_COLORBAR: 348 - display->set_drawmode(DRMODE_FG); 348 + /*display->set_drawmode(DRMODE_FG);*/ 349 349 display->set_foreground(line->line_color); 350 - display->fillrect(x, y, width - x, bar_height); 351 - break; 350 + /*display->fillrect(x, y, width - x, bar_height);*/ 351 + /* Fall through */ 352 352 #endif 353 353 case STYLE_INVERT: 354 354 display->set_drawmode(DRMODE_FG); ··· 396 396 print_line(display, x, y, line, fmt, ap); 397 397 #if (LCD_DEPTH > 1 || (defined(LCD_REMOTE_DEPTH) && LCD_REMOTE_DEPTH > 1)) 398 398 if (display->depth > 1 && line->style > STYLE_INVERT) 399 - { 400 - display->set_foreground(fg); 401 - display->set_background(bg); 399 + { 400 + display->set_drawinfo(DRMODE_SOLID, fg, bg); 402 401 } 402 + else 403 403 #endif 404 404 display->set_drawmode(DRMODE_SOLID); 405 405 }
+2
apps/screen_access.c
··· 201 201 .get_foreground=&lcd_get_foreground, 202 202 .set_background=&lcd_set_background, 203 203 .set_foreground=&lcd_set_foreground, 204 + .set_drawinfo = &lcd_set_drawinfo, 204 205 #endif /* LCD_DEPTH > 1 */ 205 206 .update_rect=&lcd_update_rect, 206 207 .update_viewport_rect=&lcd_update_viewport_rect, ··· 289 290 .get_foreground=&lcd_remote_get_foreground, 290 291 .set_background=&lcd_remote_set_background, 291 292 .set_foreground=&lcd_remote_set_foreground, 293 + .set_drawinfo = &lcd_remote_set_drawinfo, 292 294 #endif /* LCD_REMOTE_DEPTH > 1 */ 293 295 .update_rect=&lcd_remote_update_rect, 294 296 .update_viewport_rect=&lcd_remote_update_viewport_rect,
+1
apps/screen_access.h
··· 94 94 unsigned (*get_foreground)(void); 95 95 void (*set_background)(unsigned background); 96 96 void (*set_foreground)(unsigned foreground); 97 + void (*set_drawinfo)(int mode, unsigned foreground, unsigned background); 97 98 #endif /* (LCD_DEPTH > 1) || (LCD_REMOTE_DEPTH > 1) */ 98 99 void (*update_rect)(int x, int y, int width, int height); 99 100 void (*update_viewport_rect)(int x, int y, int width, int height);