1
0
Fork 0
forked from len0rd/rockbox

[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
This commit is contained in:
William Wilgus 2023-09-13 23:11:05 -04:00
parent d8b995c642
commit df51d49b22
2 changed files with 9 additions and 4 deletions

View file

@ -1378,6 +1378,7 @@ static char *debug_get_flags(uint32_t flags)
SETTINGFLAGS(F_TABLE_SETTING); SETTINGFLAGS(F_TABLE_SETTING);
SETTINGFLAGS(F_ALLOW_ARBITRARY_VALS); SETTINGFLAGS(F_ALLOW_ARBITRARY_VALS);
SETTINGFLAGS(F_CB_ON_SELECT_ONLY); SETTINGFLAGS(F_CB_ON_SELECT_ONLY);
SETTINGFLAGS(F_CB_ONLY_IF_CHANGED);
SETTINGFLAGS(F_MIN_ISFUNC); SETTINGFLAGS(F_MIN_ISFUNC);
SETTINGFLAGS(F_MAX_ISFUNC); SETTINGFLAGS(F_MAX_ISFUNC);
SETTINGFLAGS(F_DEF_ISFUNC); SETTINGFLAGS(F_DEF_ISFUNC);

View file

@ -101,8 +101,7 @@ struct table_setting {
}; };
#define F_TABLE_SETTING 0x2000 #define F_TABLE_SETTING 0x2000
#define F_ALLOW_ARBITRARY_VALS 0x4000 #define F_ALLOW_ARBITRARY_VALS 0x4000
#define F_CB_ON_SELECT_ONLY 0x20000
#define F_CB_ONLY_IF_CHANGED 0x40000
/* these use the _isfunc_type type for the function */ /* these use the _isfunc_type type for the function */
/* typedef int (*_isfunc_type)(void); */ /* typedef int (*_isfunc_type)(void); */
#define F_MIN_ISFUNC 0x100000 /* min(above) is function pointer to above type */ #define F_MIN_ISFUNC 0x100000 /* min(above) is function pointer to above type */
@ -153,11 +152,16 @@ struct custom_setting {
- a NVRAM setting is removed - a NVRAM setting is removed
*/ */
#define F_TEMPVAR 0x0400 /* used if the setting should be set using a temp var */ #define F_TEMPVAR 0x0400 /* used if the setting should be set using a temp var */
#define F_PADTITLE 0x800 /* pad the title with spaces to force it to scroll */ #define F_PADTITLE 0x0800 /* pad the title with spaces to force it to scroll */
#define F_NO_WRAP 0x1000 /* used if the list should not wrap */ #define F_NO_WRAP 0x1000 /* used if the list should not wrap */
#define F_BANFROMQS 0x80000000 /* ban the setting from the quickscreen items */ #define F_CB_ON_SELECT_ONLY 0x10000000 /* option_callback only called if selected */
#define F_CB_ONLY_IF_CHANGED 0x20000000 /* option_callback only called if setting changed */
#define F_DEPRECATED 0x40000000 /* DEPRECATED setting, don't write to .cfg */ #define F_DEPRECATED 0x40000000 /* DEPRECATED setting, don't write to .cfg */
#define F_BANFROMQS 0x80000000 /* ban the setting from the quickscreen items */
struct settings_list { struct settings_list {
uint32_t flags; /* BD__ _SER TFFF NNN_ _ATW PTVC IFRB STTT */ uint32_t flags; /* BD__ _SER TFFF NNN_ _ATW PTVC IFRB STTT */
void *setting; void *setting;