From 0f0d9064c5e7add982d4b62850375985d79c1168 Mon Sep 17 00:00:00 2001 From: Thomas Martitz Date: Wed, 14 Oct 2009 15:49:11 +0000 Subject: Remove wps_reset(), and rename skin_data_init to skin_data_reset() and extend it to zero most of the wps_data members. As these are called when parsing a skin it doesn't need to be called by the wps or settings, so make it local to skin_parser.c. Reorder the members of struct wps_data for more effecient alignment. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23171 a1c6a512-1295-4272-9138-f99709370657 --- apps/gui/wps.c | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) (limited to 'apps/gui/wps.c') diff --git a/apps/gui/wps.c b/apps/gui/wps.c index 2529686e3e..3524ba34b7 100644 --- a/apps/gui/wps.c +++ b/apps/gui/wps.c @@ -79,11 +79,12 @@ #define MIN_FF_REWIND_STEP 500 /* this is for the viewportmanager */ -static int wpsbars; -/* currently only one wps_state is needed */ -static struct wps_state wps_state; -static struct gui_wps gui_wps[NB_SCREENS]; -static struct wps_data wps_datas[NB_SCREENS]; +static int wpsbars = 0; + +/* currently only one wps_state is needed, initialize to 0 */ +static struct wps_state wps_state = { .id3 = NULL}; +static struct gui_wps gui_wps[NB_SCREENS] = {{ 0 }}; +static struct wps_data wps_datas[NB_SCREENS] = {{ 0 }}; /* initial setup of wps_data */ static void wps_state_init(void); @@ -160,12 +161,6 @@ void wps_data_load(enum screen_type screen, const char *buf, bool isfile) #endif } -void wps_data_init(enum screen_type screen) -{ - skin_data_init(gui_wps[screen].data); -} - - static bool wps_fading_out = false; void fade(bool fade_in, bool updatewps) { @@ -1288,7 +1283,6 @@ void gui_sync_wps_init(void) int i; FOR_NB_SCREENS(i) { - skin_data_init(&wps_datas[i]); #ifdef HAVE_ALBUMART wps_datas[i].albumart = NULL; #endif -- cgit v1.2.3