summaryrefslogtreecommitdiffstats
path: root/apps/root_menu.c
diff options
context:
space:
mode:
authorAlexander Levin <al.le@gmx.de>2012-03-02 20:33:13 +0100
committerAlexander Levin <al.le@gmx.de>2012-03-16 22:26:13 +0100
commit7676dae3e0f279d4b193f1c9abf8977c8f52e5d2 (patch)
tree56989be5ea4ddb15618a060dc2b0afbdc996f29a /apps/root_menu.c
parente07b22f27e4fb23355d96e840252753be8b2ba39 (diff)
downloadrockbox-7676dae3e0f279d4b193f1c9abf8977c8f52e5d2.tar.gz
rockbox-7676dae3e0f279d4b193f1c9abf8977c8f52e5d2.tar.bz2
rockbox-7676dae3e0f279d4b193f1c9abf8977c8f52e5d2.zip
More meaningful name and type for 'root menu' setting
The patch changes 'int root_menu' to 'bool root_menu_customized' which better expresses what the value means. Change-Id: Ic272ac161fc05f5d3298e1e46578977dd590ebaf
Diffstat (limited to 'apps/root_menu.c')
-rw-r--r--apps/root_menu.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/apps/root_menu.c b/apps/root_menu.c
index 6e3164cf04..3f2e933461 100644
--- a/apps/root_menu.c
+++ b/apps/root_menu.c
@@ -549,7 +549,7 @@ void root_menu_load_from_cfg(void* setting, char *value)
if (!main_menu_added)
root_menu__[menu_item_count++] = (struct menu_item_ex *)&menu_;
root_menu_.flags |= MENU_ITEM_COUNT(menu_item_count);
- *(int*)setting = 1;
+ *(bool*)setting = true;
}
char* root_menu_write_to_cfg(void* setting, char*buf, int buf_len)
@@ -586,13 +586,13 @@ void root_menu_set_default(void* setting, void* defaultval)
root_menu__[i] = (struct menu_item_ex *)menu_table[i].item;
}
root_menu_.flags |= MENU_ITEM_COUNT(MAX_MENU_ITEMS);
- *(int*)setting = 0;
+ *(bool*)setting = false;
}
bool root_menu_is_changed(void* setting, void* defaultval)
{
(void)defaultval;
- return *(int*)setting != 0;
+ return *(bool*)setting;
}
static int item_callback(int action, const struct menu_item_ex *this_item)