summaryrefslogtreecommitdiffstats
path: root/apps/gui/quickscreen.c
diff options
context:
space:
mode:
authorNils Wallménius <nils@rockbox.org>2009-10-28 20:41:34 +0000
committerNils Wallménius <nils@rockbox.org>2009-10-28 20:41:34 +0000
commitff197a4706ffaf836e84ef761b82c22513b95a0c (patch)
tree51f2f8a066edcf042dc7d9f716234b520ec1008a /apps/gui/quickscreen.c
parente5086076a0071f4e02d87305355a968670594ec9 (diff)
downloadrockbox-ff197a4706ffaf836e84ef761b82c22513b95a0c.tar.gz
rockbox-ff197a4706ffaf836e84ef761b82c22513b95a0c.tar.bz2
rockbox-ff197a4706ffaf836e84ef761b82c22513b95a0c.zip
Use array for quickscreen item settings to simplify some logic
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23380 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/gui/quickscreen.c')
-rw-r--r--apps/gui/quickscreen.c27
1 files changed, 6 insertions, 21 deletions
diff --git a/apps/gui/quickscreen.c b/apps/gui/quickscreen.c
index 1abe2d5992..c7774baef4 100644
--- a/apps/gui/quickscreen.c
+++ b/apps/gui/quickscreen.c
@@ -367,16 +367,16 @@ bool quick_screen_quick(int button_enter)
int oldrepeat = global_settings.repeat_mode;
qs.items[QUICKSCREEN_TOP] =
- get_setting(global_settings.qs_item_top,
+ get_setting(global_settings.qs_items[QUICKSCREEN_TOP],
find_setting(&global_settings.party_mode, NULL));
qs.items[QUICKSCREEN_LEFT] =
- get_setting(global_settings.qs_item_left,
+ get_setting(global_settings.qs_items[QUICKSCREEN_LEFT],
find_setting(&global_settings.playlist_shuffle, NULL));
qs.items[QUICKSCREEN_RIGHT] =
- get_setting(global_settings.qs_item_right,
+ get_setting(global_settings.qs_items[QUICKSCREEN_RIGHT],
find_setting(&global_settings.repeat_mode, NULL));
qs.items[QUICKSCREEN_BOTTOM] =
- get_setting(global_settings.qs_item_bottom,
+ get_setting(global_settings.qs_items[QUICKSCREEN_BOTTOM],
find_setting(&global_settings.dirfilter, NULL));
qs.callback = NULL;
@@ -452,22 +452,7 @@ void set_as_qs_item(const struct settings_list *setting,
if (&settings[i] == setting)
break;
}
- switch (item)
- {
- case QUICKSCREEN_TOP:
- global_settings.qs_item_top = i;
- break;
- case QUICKSCREEN_LEFT:
- global_settings.qs_item_left = i;
- break;
- case QUICKSCREEN_RIGHT:
- global_settings.qs_item_right = i;
- break;
- case QUICKSCREEN_BOTTOM:
- global_settings.qs_item_bottom = i;
- break;
- default: /* shut the compiler up */
- break;
- }
+
+ global_settings.qs_items[item] = i;
}