diff options
Diffstat (limited to 'apps/gui/option_select.c')
-rw-r--r-- | apps/gui/option_select.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/apps/gui/option_select.c b/apps/gui/option_select.c index 023f9b47e5..0e4ed8deac 100644 --- a/apps/gui/option_select.c +++ b/apps/gui/option_select.c | |||
@@ -44,7 +44,16 @@ | |||
44 | #endif | 44 | #endif |
45 | 45 | ||
46 | static int selection_to_val(const struct settings_list *setting, int selection); | 46 | static int selection_to_val(const struct settings_list *setting, int selection); |
47 | 47 | int option_value_as_int(const struct settings_list *setting) | |
48 | { | ||
49 | int type = (setting->flags & F_T_MASK); | ||
50 | int temp = 0; | ||
51 | if (type == F_T_BOOL) | ||
52 | temp = *(bool*)setting->setting?1:0; | ||
53 | else if (type == F_T_UINT || type == F_T_INT) | ||
54 | temp = *(int*)setting->setting; | ||
55 | return temp; | ||
56 | } | ||
48 | static const char *unit_strings[] = | 57 | static const char *unit_strings[] = |
49 | { | 58 | { |
50 | [UNIT_INT] = "", [UNIT_MS] = "ms", | 59 | [UNIT_INT] = "", [UNIT_MS] = "ms", |
@@ -214,7 +223,8 @@ static int option_talk(int selected_item, void * data) | |||
214 | return 0; | 223 | return 0; |
215 | } | 224 | } |
216 | 225 | ||
217 | #ifdef HAVE_QUICKSCREEN /* only the quickscreen uses this so far */ | 226 | #if defined(HAVE_QUICKSCREEN) || defined(HAVE_RECORDING) |
227 | /* only the quickscreen and recording trigger needs this */ | ||
218 | void option_select_next_val(const struct settings_list *setting, | 228 | void option_select_next_val(const struct settings_list *setting, |
219 | bool previous, bool apply) | 229 | bool previous, bool apply) |
220 | { | 230 | { |