mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-13 18:17:39 -04:00
lcd-16bit: Remove {lss,lse,lst}_pattern fields from struct viewport.
These where used for line styling during scrolling, which is now done in apps/, The viewport struct doesn't need to record these anymore. Change-Id: I810d9dcb2644b00a798c6e75acab69c74a78e77f
This commit is contained in:
parent
deb6ac3693
commit
e1c7b3b8f7
11 changed files with 3 additions and 77 deletions
|
@ -1957,9 +1957,9 @@ static int convert_viewport(struct wps_data *data, struct skin_element* element)
|
||||||
skin_vp->start_bgcolour = skin_vp->vp.bg_pattern;
|
skin_vp->start_bgcolour = skin_vp->vp.bg_pattern;
|
||||||
#endif
|
#endif
|
||||||
#ifdef HAVE_LCD_COLOR
|
#ifdef HAVE_LCD_COLOR
|
||||||
skin_vp->start_gradient.start = skin_vp->vp.lss_pattern;
|
skin_vp->start_gradient.start = global_settings.lss_color;
|
||||||
skin_vp->start_gradient.end = skin_vp->vp.lse_pattern;
|
skin_vp->start_gradient.end = global_settings.lse_color;
|
||||||
skin_vp->start_gradient.text = skin_vp->vp.lst_pattern;
|
skin_vp->start_gradient.text = global_settings.lst_color;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -859,11 +859,6 @@ void skin_render(struct gui_wps *gwps, unsigned refresh_mode)
|
||||||
skin_backdrop_show(data->backdrop_id);
|
skin_backdrop_show(data->backdrop_id);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#ifdef HAVE_LCD_COLOR
|
|
||||||
skin_viewport->vp.lss_pattern = skin_viewport->start_gradient.start;
|
|
||||||
skin_viewport->vp.lse_pattern = skin_viewport->start_gradient.end;
|
|
||||||
skin_viewport->vp.lst_pattern = skin_viewport->start_gradient.text;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* dont redraw the viewport if its disabled */
|
/* dont redraw the viewport if its disabled */
|
||||||
if (skin_viewport->hidden_flags&VP_NEVER_VISIBLE)
|
if (skin_viewport->hidden_flags&VP_NEVER_VISIBLE)
|
||||||
|
|
|
@ -329,11 +329,6 @@ void viewport_set_fullscreen(struct viewport *vp,
|
||||||
{
|
{
|
||||||
vp->fg_pattern = FG_FALLBACK;
|
vp->fg_pattern = FG_FALLBACK;
|
||||||
vp->bg_pattern = BG_FALLBACK;
|
vp->bg_pattern = BG_FALLBACK;
|
||||||
#ifdef HAVE_LCD_COLOR
|
|
||||||
vp->lss_pattern = global_settings.lss_color;
|
|
||||||
vp->lse_pattern = global_settings.lse_color;
|
|
||||||
vp->lst_pattern = global_settings.lst_color;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -240,11 +240,6 @@ static struct viewport* opt_viewport(lua_State *L, int narg, struct viewport* al
|
||||||
#if LCD_DEPTH > 1
|
#if LCD_DEPTH > 1
|
||||||
check_tablevalue(L, "fg_pattern", tablepos, &vp->fg_pattern, true);
|
check_tablevalue(L, "fg_pattern", tablepos, &vp->fg_pattern, true);
|
||||||
check_tablevalue(L, "bg_pattern", tablepos, &vp->bg_pattern, true);
|
check_tablevalue(L, "bg_pattern", tablepos, &vp->bg_pattern, true);
|
||||||
#ifdef HAVE_LCD_COLOR
|
|
||||||
check_tablevalue(L, "lss_pattern", tablepos, &vp->lss_pattern, true);
|
|
||||||
check_tablevalue(L, "lse_pattern", tablepos, &vp->lse_pattern, true);
|
|
||||||
check_tablevalue(L, "lst_pattern", tablepos, &vp->lst_pattern, true);
|
|
||||||
#endif
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return vp;
|
return vp;
|
||||||
|
|
|
@ -188,9 +188,6 @@ static bool game_finished;
|
||||||
* int drawmode- Modes defined in lcd.h
|
* int drawmode- Modes defined in lcd.h
|
||||||
* unsigned fg_pattern - foreground color
|
* unsigned fg_pattern - foreground color
|
||||||
* unsigned bg_pattern - backbround color
|
* unsigned bg_pattern - backbround color
|
||||||
* unsigned lss_pattern - Selector colors (currently unused)
|
|
||||||
* unsigned lse_pattern - |
|
|
||||||
* unsigned lst_pattern - \/
|
|
||||||
*
|
*
|
||||||
* The rest of the touch button elements are:
|
* The rest of the touch button elements are:
|
||||||
* bool repeat - requires the area be held for the action
|
* bool repeat - requires the area be held for the action
|
||||||
|
|
|
@ -47,11 +47,6 @@ static struct viewport vp0 =
|
||||||
.fg_pattern = LCD_DEFAULT_FG,
|
.fg_pattern = LCD_DEFAULT_FG,
|
||||||
.bg_pattern = BGCOLOR_1,
|
.bg_pattern = BGCOLOR_1,
|
||||||
#endif
|
#endif
|
||||||
#ifdef HAVE_LCD_COLOR
|
|
||||||
.lss_pattern = LCD_DEFAULT_BG,
|
|
||||||
.lse_pattern = LCD_DEFAULT_BG,
|
|
||||||
.lst_pattern = LCD_DEFAULT_BG,
|
|
||||||
#endif
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct viewport vp1 =
|
static struct viewport vp1 =
|
||||||
|
@ -65,11 +60,6 @@ static struct viewport vp1 =
|
||||||
#if LCD_DEPTH > 1
|
#if LCD_DEPTH > 1
|
||||||
.fg_pattern = LCD_DEFAULT_FG,
|
.fg_pattern = LCD_DEFAULT_FG,
|
||||||
.bg_pattern = LCD_DEFAULT_BG,
|
.bg_pattern = LCD_DEFAULT_BG,
|
||||||
#ifdef HAVE_LCD_COLOR
|
|
||||||
.lss_pattern = LCD_DEFAULT_BG,
|
|
||||||
.lse_pattern = LCD_DEFAULT_BG,
|
|
||||||
.lst_pattern = LCD_DEFAULT_BG,
|
|
||||||
#endif
|
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -84,11 +74,6 @@ static struct viewport vp2 =
|
||||||
#if LCD_DEPTH > 1
|
#if LCD_DEPTH > 1
|
||||||
.fg_pattern = FGCOLOR_1,
|
.fg_pattern = FGCOLOR_1,
|
||||||
.bg_pattern = BGCOLOR_2,
|
.bg_pattern = BGCOLOR_2,
|
||||||
#ifdef HAVE_LCD_COLOR
|
|
||||||
.lss_pattern = LCD_DEFAULT_BG,
|
|
||||||
.lse_pattern = LCD_DEFAULT_BG,
|
|
||||||
.lst_pattern = LCD_DEFAULT_BG,
|
|
||||||
#endif
|
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -104,11 +89,6 @@ static struct viewport vp3 =
|
||||||
#if LCD_DEPTH > 1
|
#if LCD_DEPTH > 1
|
||||||
.fg_pattern = LCD_BLACK,
|
.fg_pattern = LCD_BLACK,
|
||||||
.bg_pattern = LCD_WHITE,
|
.bg_pattern = LCD_WHITE,
|
||||||
#ifdef HAVE_LCD_COLOR
|
|
||||||
.lss_pattern = LCD_DEFAULT_BG,
|
|
||||||
.lse_pattern = LCD_DEFAULT_BG,
|
|
||||||
.lst_pattern = LCD_DEFAULT_BG,
|
|
||||||
#endif
|
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -231,11 +231,6 @@ struct screen screens[NB_SCREENS] =
|
||||||
.get_foreground=&lcd_get_foreground,
|
.get_foreground=&lcd_get_foreground,
|
||||||
.set_background=&lcd_set_background,
|
.set_background=&lcd_set_background,
|
||||||
.set_foreground=&lcd_set_foreground,
|
.set_foreground=&lcd_set_foreground,
|
||||||
#ifdef HAVE_LCD_COLOR
|
|
||||||
.set_selector_start=&lcd_set_selector_start,
|
|
||||||
.set_selector_end=&lcd_set_selector_end,
|
|
||||||
.set_selector_text=&lcd_set_selector_text,
|
|
||||||
#endif
|
|
||||||
#endif /* LCD_DEPTH > 1 */
|
#endif /* LCD_DEPTH > 1 */
|
||||||
.update_rect=&lcd_update_rect,
|
.update_rect=&lcd_update_rect,
|
||||||
.update_viewport_rect=&lcd_update_viewport_rect,
|
.update_viewport_rect=&lcd_update_viewport_rect,
|
||||||
|
|
|
@ -102,11 +102,6 @@ struct screen
|
||||||
void (*set_background)(unsigned background);
|
void (*set_background)(unsigned background);
|
||||||
void (*set_foreground)(unsigned foreground);
|
void (*set_foreground)(unsigned foreground);
|
||||||
#endif /* (LCD_DEPTH > 1) || (LCD_REMOTE_DEPTH > 1) */
|
#endif /* (LCD_DEPTH > 1) || (LCD_REMOTE_DEPTH > 1) */
|
||||||
#if defined(HAVE_LCD_COLOR)
|
|
||||||
void (*set_selector_start)(unsigned selector);
|
|
||||||
void (*set_selector_end)(unsigned selector);
|
|
||||||
void (*set_selector_text)(unsigned selector_text);
|
|
||||||
#endif
|
|
||||||
void (*update_rect)(int x, int y, int width, int height);
|
void (*update_rect)(int x, int y, int width, int height);
|
||||||
void (*update_viewport_rect)(int x, int y, int width, int height);
|
void (*update_viewport_rect)(int x, int y, int width, int height);
|
||||||
void (*fillrect)(int x, int y, int width, int height);
|
void (*fillrect)(int x, int y, int width, int height);
|
||||||
|
|
|
@ -994,9 +994,6 @@ void settings_apply(bool read_disk)
|
||||||
#ifdef HAVE_LCD_COLOR
|
#ifdef HAVE_LCD_COLOR
|
||||||
screens[SCREEN_MAIN].set_foreground(global_settings.fg_color);
|
screens[SCREEN_MAIN].set_foreground(global_settings.fg_color);
|
||||||
screens[SCREEN_MAIN].set_background(global_settings.bg_color);
|
screens[SCREEN_MAIN].set_background(global_settings.bg_color);
|
||||||
screens[SCREEN_MAIN].set_selector_start(global_settings.lss_color);
|
|
||||||
screens[SCREEN_MAIN].set_selector_end(global_settings.lse_color);
|
|
||||||
screens[SCREEN_MAIN].set_selector_text(global_settings.lst_color);
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_LCD_BITMAP
|
#ifdef HAVE_LCD_BITMAP
|
||||||
|
|
|
@ -52,9 +52,6 @@ static struct viewport default_vp =
|
||||||
.drawmode = DRMODE_SOLID,
|
.drawmode = DRMODE_SOLID,
|
||||||
.fg_pattern = LCD_DEFAULT_FG,
|
.fg_pattern = LCD_DEFAULT_FG,
|
||||||
.bg_pattern = LCD_DEFAULT_BG,
|
.bg_pattern = LCD_DEFAULT_BG,
|
||||||
.lss_pattern = LCD_DEFAULT_BG,
|
|
||||||
.lse_pattern = LCD_DEFAULT_BG,
|
|
||||||
.lst_pattern = LCD_DEFAULT_BG,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct viewport* current_vp IDATA_ATTR = &default_vp;
|
static struct viewport* current_vp IDATA_ATTR = &default_vp;
|
||||||
|
@ -181,21 +178,6 @@ unsigned lcd_get_background(void)
|
||||||
return current_vp->bg_pattern;
|
return current_vp->bg_pattern;
|
||||||
}
|
}
|
||||||
|
|
||||||
void lcd_set_selector_start(unsigned color)
|
|
||||||
{
|
|
||||||
current_vp->lss_pattern = color;
|
|
||||||
}
|
|
||||||
|
|
||||||
void lcd_set_selector_end(unsigned color)
|
|
||||||
{
|
|
||||||
current_vp->lse_pattern = color;
|
|
||||||
}
|
|
||||||
|
|
||||||
void lcd_set_selector_text(unsigned color)
|
|
||||||
{
|
|
||||||
current_vp->lst_pattern = color;
|
|
||||||
}
|
|
||||||
|
|
||||||
void lcd_set_drawinfo(int mode, unsigned fg_color, unsigned bg_color)
|
void lcd_set_drawinfo(int mode, unsigned fg_color, unsigned bg_color)
|
||||||
{
|
{
|
||||||
lcd_set_drawmode(mode);
|
lcd_set_drawmode(mode);
|
||||||
|
|
|
@ -48,11 +48,6 @@ struct viewport {
|
||||||
#if LCD_DEPTH > 1
|
#if LCD_DEPTH > 1
|
||||||
unsigned fg_pattern;
|
unsigned fg_pattern;
|
||||||
unsigned bg_pattern;
|
unsigned bg_pattern;
|
||||||
#ifdef HAVE_LCD_COLOR
|
|
||||||
unsigned lss_pattern;
|
|
||||||
unsigned lse_pattern;
|
|
||||||
unsigned lst_pattern;
|
|
||||||
#endif
|
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue