diff options
author | Thomas Martitz <kugel@rockbox.org> | 2009-10-14 15:49:11 +0000 |
---|---|---|
committer | Thomas Martitz <kugel@rockbox.org> | 2009-10-14 15:49:11 +0000 |
commit | 0f0d9064c5e7add982d4b62850375985d79c1168 (patch) | |
tree | 432ace6da9deb1723e65851fd86a17c621c90405 /apps/gui/wps.c | |
parent | ef53cc099e1a04442230967a755bf8850afef619 (diff) | |
download | rockbox-0f0d9064c5e7add982d4b62850375985d79c1168.tar.gz rockbox-0f0d9064c5e7add982d4b62850375985d79c1168.zip |
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
Diffstat (limited to 'apps/gui/wps.c')
-rw-r--r-- | apps/gui/wps.c | 18 |
1 files changed, 6 insertions, 12 deletions
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 @@ | |||
79 | #define MIN_FF_REWIND_STEP 500 | 79 | #define MIN_FF_REWIND_STEP 500 |
80 | 80 | ||
81 | /* this is for the viewportmanager */ | 81 | /* this is for the viewportmanager */ |
82 | static int wpsbars; | 82 | static int wpsbars = 0; |
83 | /* currently only one wps_state is needed */ | 83 | |
84 | static struct wps_state wps_state; | 84 | /* currently only one wps_state is needed, initialize to 0 */ |
85 | static struct gui_wps gui_wps[NB_SCREENS]; | 85 | static struct wps_state wps_state = { .id3 = NULL}; |
86 | static struct wps_data wps_datas[NB_SCREENS]; | 86 | static struct gui_wps gui_wps[NB_SCREENS] = {{ 0 }}; |
87 | static struct wps_data wps_datas[NB_SCREENS] = {{ 0 }}; | ||
87 | 88 | ||
88 | /* initial setup of wps_data */ | 89 | /* initial setup of wps_data */ |
89 | static void wps_state_init(void); | 90 | static void wps_state_init(void); |
@@ -160,12 +161,6 @@ void wps_data_load(enum screen_type screen, const char *buf, bool isfile) | |||
160 | #endif | 161 | #endif |
161 | } | 162 | } |
162 | 163 | ||
163 | void wps_data_init(enum screen_type screen) | ||
164 | { | ||
165 | skin_data_init(gui_wps[screen].data); | ||
166 | } | ||
167 | |||
168 | |||
169 | static bool wps_fading_out = false; | 164 | static bool wps_fading_out = false; |
170 | void fade(bool fade_in, bool updatewps) | 165 | void fade(bool fade_in, bool updatewps) |
171 | { | 166 | { |
@@ -1288,7 +1283,6 @@ void gui_sync_wps_init(void) | |||
1288 | int i; | 1283 | int i; |
1289 | FOR_NB_SCREENS(i) | 1284 | FOR_NB_SCREENS(i) |
1290 | { | 1285 | { |
1291 | skin_data_init(&wps_datas[i]); | ||
1292 | #ifdef HAVE_ALBUMART | 1286 | #ifdef HAVE_ALBUMART |
1293 | wps_datas[i].albumart = NULL; | 1287 | wps_datas[i].albumart = NULL; |
1294 | #endif | 1288 | #endif |