diff options
author | Aidan MacDonald <amachronic@protonmail.com> | 2022-11-30 11:57:02 +0000 |
---|---|---|
committer | Aidan MacDonald <amachronic@protonmail.com> | 2022-12-04 05:25:50 -0500 |
commit | bbe39420395618944a7174bc3d9be1bc67b257a3 (patch) | |
tree | 8e38495a2bb9da78ce53398333ee770b4b69c57c /apps/settings.h | |
parent | 0550c64226a6edfd9bc51b914fb4932840543354 (diff) | |
download | rockbox-bbe39420395618944a7174bc3d9be1bc67b257a3.tar.gz rockbox-bbe39420395618944a7174bc3d9be1bc67b257a3.zip |
settings: Settings ID to pointer for cfg_string_to_int()
Accept a pointer to struct settings_list instead of an index in the
settings array. Refactor the skin engine's touchregion_setup_setting()
to avoid the use of indices.
Change-Id: I784a5e49205da6874b8b419dd5413f722ad45b67
Diffstat (limited to 'apps/settings.h')
-rw-r--r-- | apps/settings.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/settings.h b/apps/settings.h index df82ae3687..5d1237b1a5 100644 --- a/apps/settings.h +++ b/apps/settings.h @@ -266,7 +266,7 @@ enum optiontype { INT, BOOL }; const struct settings_list* find_setting(const void* variable, int *id); const struct settings_list* find_setting_by_cfgname(const char* name, int *id); bool cfg_int_to_string(int setting_id, int val, char* buf, int buf_len); -bool cfg_string_to_int(int setting_id, int* out, const char* str); +bool cfg_string_to_int(const struct settings_list *setting, int* out, const char* str); bool cfg_to_string(int setting_id, char* buf, int buf_len); bool copy_filename_setting(char *buf, size_t buflen, const char *input, const struct filename_setting *fs); |