summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilliam Wilgus <wilgus.william@gmail.com>2023-09-13 23:11:05 -0400
committerWilliam Wilgus <wilgus.william@gmail.com>2023-09-13 23:25:05 -0400
commitdf51d49b22d0652a355e48cd33934a14fb0acc07 (patch)
tree7fae532f390a62b125542f79e2019357e056282c
parentd8b995c6424c942381a52f411555b51a62bedec5 (diff)
downloadrockbox-df51d49b22d0652a355e48cd33934a14fb0acc07.tar.gz
rockbox-df51d49b22d0652a355e48cd33934a14fb0acc07.zip
[BugFix] F_CB_ONLY_IF_CHANGED Overlapped NVRAM
the flag I chose was already used for nvram settings moved both CB flags to unused flags Change-Id: I9fdbc88460b08654a06b4d5950712947eab04b79
-rw-r--r--apps/settings.c1
-rw-r--r--apps/settings_list.h12
2 files changed, 9 insertions, 4 deletions
diff --git a/apps/settings.c b/apps/settings.c
index 619c5062ec..8cfd4afec3 100644
--- a/apps/settings.c
+++ b/apps/settings.c
@@ -1378,6 +1378,7 @@ static char *debug_get_flags(uint32_t flags)
1378 SETTINGFLAGS(F_TABLE_SETTING); 1378 SETTINGFLAGS(F_TABLE_SETTING);
1379 SETTINGFLAGS(F_ALLOW_ARBITRARY_VALS); 1379 SETTINGFLAGS(F_ALLOW_ARBITRARY_VALS);
1380 SETTINGFLAGS(F_CB_ON_SELECT_ONLY); 1380 SETTINGFLAGS(F_CB_ON_SELECT_ONLY);
1381 SETTINGFLAGS(F_CB_ONLY_IF_CHANGED);
1381 SETTINGFLAGS(F_MIN_ISFUNC); 1382 SETTINGFLAGS(F_MIN_ISFUNC);
1382 SETTINGFLAGS(F_MAX_ISFUNC); 1383 SETTINGFLAGS(F_MAX_ISFUNC);
1383 SETTINGFLAGS(F_DEF_ISFUNC); 1384 SETTINGFLAGS(F_DEF_ISFUNC);
diff --git a/apps/settings_list.h b/apps/settings_list.h
index 3a6b0d60c2..d16d7e255b 100644
--- a/apps/settings_list.h
+++ b/apps/settings_list.h
@@ -101,8 +101,7 @@ struct table_setting {
101}; 101};
102#define F_TABLE_SETTING 0x2000 102#define F_TABLE_SETTING 0x2000
103#define F_ALLOW_ARBITRARY_VALS 0x4000 103#define F_ALLOW_ARBITRARY_VALS 0x4000
104#define F_CB_ON_SELECT_ONLY 0x20000 104
105#define F_CB_ONLY_IF_CHANGED 0x40000
106/* these use the _isfunc_type type for the function */ 105/* these use the _isfunc_type type for the function */
107/* typedef int (*_isfunc_type)(void); */ 106/* typedef int (*_isfunc_type)(void); */
108#define F_MIN_ISFUNC 0x100000 /* min(above) is function pointer to above type */ 107#define F_MIN_ISFUNC 0x100000 /* min(above) is function pointer to above type */
@@ -153,11 +152,16 @@ struct custom_setting {
153- a NVRAM setting is removed 152- a NVRAM setting is removed
154*/ 153*/
155#define F_TEMPVAR 0x0400 /* used if the setting should be set using a temp var */ 154#define F_TEMPVAR 0x0400 /* used if the setting should be set using a temp var */
156#define F_PADTITLE 0x800 /* pad the title with spaces to force it to scroll */ 155#define F_PADTITLE 0x0800 /* pad the title with spaces to force it to scroll */
157#define F_NO_WRAP 0x1000 /* used if the list should not wrap */ 156#define F_NO_WRAP 0x1000 /* used if the list should not wrap */
158 157
159#define F_BANFROMQS 0x80000000 /* ban the setting from the quickscreen items */ 158#define F_CB_ON_SELECT_ONLY 0x10000000 /* option_callback only called if selected */
159#define F_CB_ONLY_IF_CHANGED 0x20000000 /* option_callback only called if setting changed */
160
160#define F_DEPRECATED 0x40000000 /* DEPRECATED setting, don't write to .cfg */ 161#define F_DEPRECATED 0x40000000 /* DEPRECATED setting, don't write to .cfg */
162#define F_BANFROMQS 0x80000000 /* ban the setting from the quickscreen items */
163
164
161struct settings_list { 165struct settings_list {
162 uint32_t flags; /* BD__ _SER TFFF NNN_ _ATW PTVC IFRB STTT */ 166 uint32_t flags; /* BD__ _SER TFFF NNN_ _ATW PTVC IFRB STTT */
163 void *setting; 167 void *setting;