From 767625d4c2004c980e52a9887785b98b07774ef7 Mon Sep 17 00:00:00 2001 From: alle Date: Tue, 18 Aug 2009 22:39:17 +0000 Subject: [PATCH] Add comment to the BOOL_SETTING macro; use that macro for OFFON_SETTING (FS#10544) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22413 a1c6a512-1295-4272-9138-f99709370657 --- apps/settings_list.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/apps/settings_list.c b/apps/settings_list.c index 9ea95573c..73c39bfa5 100644 --- a/apps/settings_list.c +++ b/apps/settings_list.c @@ -88,7 +88,10 @@ {.sound_setting=(struct sound_setting[]){{setting}}} } /* Use for bool variables which don't use LANG_SET_BOOL_YES and LANG_SET_BOOL_NO - or dont save as "off" or "on" in the cfg */ + or dont save as "off" or "on" in the cfg. + cfgvals are comma separated values (without spaces after the comma!) to write + for 'false' and 'true' (in this order) + */ #define BOOL_SETTING(flags,var,lang_id,default,name,cfgvals,yes,no,cb) \ {flags|F_BOOL_SETTING, &global_settings.var, \ lang_id, BOOL(default),name,cfgvals, \ @@ -96,10 +99,8 @@ /* bool setting which does use LANG_YES and _NO and save as "off,on" */ #define OFFON_SETTING(flags,var,lang_id,default,name,cb) \ - {flags|F_BOOL_SETTING, &global_settings.var, \ - lang_id, BOOL(default),name,off_on, \ - {.bool_setting=(struct bool_setting[]) \ - {{cb,LANG_SET_BOOL_YES,LANG_SET_BOOL_NO}}} } + BOOL_SETTING(flags,var,lang_id,default,name,off_on, \ + LANG_SET_BOOL_YES,LANG_SET_BOOL_NO,cb) /* int variable which is NOT saved to .cfg files, (Use NVRAM() in the flags to save to the nvram (or nvram.bin file) */ -- 2.11.4.GIT