1
0
Fork 0
forked from len0rd/rockbox

Remove wps_data.remote_wps. It's redundant with the new global curr_screen.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23512 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Thomas Martitz 2009-11-04 07:14:02 +00:00
parent 6750d65f79
commit c0635ba6c9
5 changed files with 3 additions and 39 deletions

View file

@ -696,12 +696,6 @@ static int parse_viewport(const char *wps_bufptr,
(void)token; /* Kill warnings */
const char *ptr = wps_bufptr;
const int screen =
#ifdef HAVE_REMOTE_LCD
wps_data->remote_wps ? SCREEN_REMOTE :
#endif
SCREEN_MAIN;
struct skin_viewport *skin_vp = skin_buffer_alloc(sizeof(struct skin_viewport));
/* check for the optional letter to signify its a hideable viewport */
@ -749,7 +743,7 @@ static int parse_viewport(const char *wps_bufptr,
struct viewport *vp = &skin_vp->vp;
/* format: %V|x|y|width|height|font|fg_pattern|bg_pattern| */
if (!(ptr = viewport_parse_viewport(vp, screen, ptr, '|')))
if (!(ptr = viewport_parse_viewport(vp, curr_screen, ptr, '|')))
return WPS_ERROR_INVALID_PARAM;
vp->flags &= ~VP_FLAG_ALIGN_RIGHT; /* ignore right-to-left languages */
@ -1732,7 +1726,6 @@ static bool wps_parse(struct wps_data *data, const char *wps_bufptr, bool debug)
* initial setup of wps_data; does reset everything
* except fields which need to survive, i.e.
*
* wps_data->remote_wps
**/
void skin_data_reset(struct wps_data *wps_data)
{
@ -1784,7 +1777,7 @@ static bool load_skin_bmp(struct wps_data *wps_data, struct bitmap *bitmap, char
/* load the image */
int format;
#ifdef HAVE_REMOTE_LCD
if (wps_data->remote_wps)
if (curr_screen == SCREEN_REMOTE)
format = FORMAT_ANY|FORMAT_REMOTE;
else
#endif
@ -1839,16 +1832,10 @@ static bool load_skin_bitmaps(struct wps_data *wps_data, char *bmpdir)
#if (LCD_DEPTH > 1) || (defined(HAVE_REMOTE_LCD) && (LCD_REMOTE_DEPTH > 1))
if (bmp_names[BACKDROP_BMP])
{
int screen = SCREEN_MAIN;
char img_path[MAX_PATH];
get_image_filename(bmp_names[BACKDROP_BMP], bmpdir,
img_path, sizeof(img_path));
#if defined(HAVE_REMOTE_LCD)
/* We only need to check LCD type if there is a remote LCD */
if (wps_data->remote_wps)
screen = SCREEN_REMOTE;
#endif
screens[screen].backdrop_load(BACKDROP_SKIN_WPS, img_path);
screens[curr_screen].backdrop_load(BACKDROP_SKIN_WPS, img_path);
}
#endif /* has backdrop support */

View file

@ -274,10 +274,6 @@ struct wps_data
bool full_line_progressbar;
#endif
bool wps_loaded;
#ifdef HAVE_REMOTE_LCD
/* this must not be reset on skin loading */
bool remote_wps;
#endif
};
/* wps_data end */

View file

@ -71,9 +71,6 @@ void sb_skin_data_load(enum screen_type screen, const char *buf, bool isfile)
if (!success)
remove_event(GUI_EVENT_ACTIONUPDATE, sb_skin_update);
#ifdef HAVE_REMOVE_LCD
data->remote_wps = !(screen == SCREEN_MAIN);
#endif
loaded_ok[screen] = success;
}
@ -210,9 +207,6 @@ void sb_skin_init(void)
#ifdef HAVE_ALBUMART
sb_skin_data[i].albumart = NULL;
sb_skin_data[i].playback_aa_slot = -1;
#endif
#ifdef HAVE_REMOTE_LCD
sb_skin_data[i].remote_wps = (i == SCREEN_REMOTE);
#endif
sb_skin[i].data = &sb_skin_data[i];
sb_skin[i].display = &screens[i];

View file

@ -153,10 +153,6 @@ void wps_data_load(enum screen_type screen, const char *buf, bool isfile)
};
skin_data_load(screen, gui_wps[screen].data, skin_buf[screen], false);
}
#ifdef HAVE_REMOVE_LCD
gui_wps[screen].data->remote_wps = !(screen == SCREEN_MAIN);
#endif
}
void fade(bool fade_in, bool updatewps)
@ -1279,9 +1275,6 @@ void gui_sync_wps_init(void)
#ifdef HAVE_ALBUMART
wps_datas[i].albumart = NULL;
wps_datas[i].playback_aa_slot = -1;
#endif
#ifdef HAVE_REMOTE_LCD
wps_datas[i].remote_wps = (i == SCREEN_REMOTE);
#endif
gui_wps[i].data = &wps_datas[i];
gui_wps[i].display = &screens[i];

View file

@ -306,12 +306,6 @@ void draw_album_art(struct gui_wps *gwps, int handle_id, bool clear)
struct wps_data *data = gwps->data;
struct skin_albumart *aa = data->albumart;
#ifdef HAVE_REMOTE_LCD
/* No album art on RWPS */
if (data->remote_wps)
return;
#endif
if (!aa)
return;