summaryrefslogtreecommitdiff
path: root/apps/gui/option_select.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/gui/option_select.c')
-rw-r--r--apps/gui/option_select.c14
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
46static int selection_to_val(const struct settings_list *setting, int selection); 46static int selection_to_val(const struct settings_list *setting, int selection);
47 47int 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}
48static const char *unit_strings[] = 57static 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 */
218void option_select_next_val(const struct settings_list *setting, 228void option_select_next_val(const struct settings_list *setting,
219 bool previous, bool apply) 229 bool previous, bool apply)
220{ 230{