summaryrefslogtreecommitdiff
path: root/apps/menus
diff options
context:
space:
mode:
authorWilliam Wilgus <me.theuser@yahoo.com>2016-11-22 06:21:31 +0100
committerWilliam Wilgus <me.theuser@yahoo.com>2017-01-17 23:06:17 +0100
commitdc87e9e9f3c383b63c3cb3713886a6c93b6a79d1 (patch)
tree47a6c0d49e7741f91fa74d7230b1267f60617902 /apps/menus
parent16a9f84571276a13f4cfd5c66db8cd63ce4e2e7f (diff)
downloadrockbox-dc87e9e9f3c383b63c3cb3713886a6c93b6a79d1.tar.gz
rockbox-dc87e9e9f3c383b63c3cb3713886a6c93b6a79d1.zip
Selective Backlight/Advanced Softlock - Selective actions based on context
Selective backlight allows the user to choose actions that will not enable the backlight when pressed. Advanced softlock allows user to choose actions that will not be blocked by screenlock on devices without a hold button. Both only occur in FM and WPS Contexts. Update: Back from the dead -Cleaned up code, removed unnecessary calls, re-arranged last filter action timeout conditional to work in case last_filtered_action_tick was never set -Added entries to the manual -Fixed back button on some menus not activating backlight -Made menus more intuitive, no actions selected now changes menu item to off. -Added talk fuctionality. -Added option to disable selective backlight while on external power. -Rewrote backlight and softlock handling code to fix issue with scrollwheels -Menu changed to have toggle(yes/no) and settings -Optimized selective actions lookup -Added option to disable notification of 'buttons locked' while softlocked -Removed uneeded code, consolidated action lookup to single function -Fixed incorrect name on selective softlock menu -Added option to disable touch on touchscreen devices -Fixed backlight on original screenlock without selective screenlock active -Added text selection in mask_select for when show_icons is off -Fixed voice in mask_select to speak if voice is defined instead of spelling -Added more lang defines (play skip seek) -Added option to disable unknown keys turning on backlight -Fixed Conditional argument In wrong place causing players without backlight to fail to build -Fixed Disable Unknown blocking detection of context change -Fixed canceling menu didn't update new settings -Added Autolock on backlight off -Removed backlight_on_force from backlight.c, Now sets ignore next to false and uses backlight_on -Cleaned up autolock code added strings to lang file -Fixed issue where rapid presses would bypass softlock -Removed old softlock code, Cleaned selective actions code -Changed menu to match existing RB menus -Fixed Backlight_on_Hold blocked by backlight_ignore_next -Fixed ignore_next for ipod -Fixed bug allowing context with softlock to bypass selective backlight -Changed mask_select to no longer prompt for changes to be saved -Changed menu names -Added ignore timeout to allow ipod scroll wheel to work properly and other players to still work properly, removed some previous code including ignore_event -Increased ignore timeout to prevent sd card accesses from interrupting action code and turning on backlight -Changed Unknown action to unmapped action in menu, changed handling code -Removed unneeded logic and variables for handling unfiltered actions -Reverted unmapped action code to previous functionality -Added manual entries (thanks JohnB) -Removed elusive unhandled unicode character from manual, changed formatting slightly Actions: Volume,Play,Seek,Skip Extras: Disable unmapped actions Disable selective backlight on external power Disable touch during softlock on touchscreen devices Disable softlock notifications (power button still notifies) Autolock on backlight off Method: Adds a function to ignore backlight on next call If selected action occurs backlight is forced on, Filter_first_keypress stays intact. Selective softlock allows selected actions through, bypasses the normal softlock routine. ToDo: DONE previous commit (#1) has attribution for folder_select.c which mask_select is based from. Change-Id: I08132ddcfd64c81751ef23b720f3ec6d68695fe4
Diffstat (limited to 'apps/menus')
-rw-r--r--apps/menus/display_menu.c123
-rw-r--r--apps/menus/settings_menu.c83
2 files changed, 173 insertions, 33 deletions
diff --git a/apps/menus/display_menu.c b/apps/menus/display_menu.c
index 948dcede00..5d53cbfe16 100644
--- a/apps/menus/display_menu.c
+++ b/apps/menus/display_menu.c
@@ -38,6 +38,10 @@
38#ifdef HAVE_REMOTE_LCD 38#ifdef HAVE_REMOTE_LCD
39#include "lcd-remote.h" 39#include "lcd-remote.h"
40#endif 40#endif
41#ifdef HAVE_BACKLIGHT
42#include "mask_select.h"
43#include "splash.h"
44#endif
41#ifdef HAVE_TOUCHSCREEN 45#ifdef HAVE_TOUCHSCREEN
42#include "screens.h" 46#include "screens.h"
43#endif 47#endif
@@ -46,9 +50,29 @@
46#include "rbunicode.h" 50#include "rbunicode.h"
47 51
48#ifdef HAVE_BACKLIGHT 52#ifdef HAVE_BACKLIGHT
49static int filterfirstkeypress_callback(int action,const struct menu_item_ex *this_item) 53static int selectivebacklight_callback(int action,const struct menu_item_ex *this_item)
50{ 54{
51 (void)this_item; 55 (void)this_item;
56
57 switch (action)
58 {
59 case ACTION_EXIT_MENUITEM:
60 case ACTION_STD_MENU:
61 case ACTION_STD_CANCEL:
62 set_selective_backlight_actions(
63 global_settings.bl_selective_actions,
64 global_settings.bl_selective_actions_mask,
65 global_settings.bl_filter_first_keypress);
66 break;
67 }
68
69 return action;
70}
71
72static int filterfirstkeypress_callback(int action,const struct menu_item_ex *this_item)
73{
74 /*(void)this_item;REMOVED*/
75
52 switch (action) 76 switch (action)
53 { 77 {
54 case ACTION_EXIT_MENUITEM: 78 case ACTION_EXIT_MENUITEM:
@@ -56,13 +80,43 @@ static int filterfirstkeypress_callback(int action,const struct menu_item_ex *th
56#ifdef HAVE_REMOTE_LCD 80#ifdef HAVE_REMOTE_LCD
57 set_remote_backlight_filter_keypress( 81 set_remote_backlight_filter_keypress(
58 global_settings.remote_bl_filter_first_keypress); 82 global_settings.remote_bl_filter_first_keypress);
59#endif 83#endif /* HAVE_REMOTE_LCD */
60 84 selectivebacklight_callback(action,this_item);/*uses Filter First KP*/
61 break; 85 break;
62 } 86 }
87
63 return action; 88 return action;
64} 89}
90
91static int selectivebacklight_set_mask(void* param)
92{
93 (void)param;
94 int mask = global_settings.bl_selective_actions_mask;
95 struct s_mask_items maskitems[]={
96 {ID2P(LANG_VOLUME) , SEL_ACTION_VOL},
97 {ID2P(LANG_ACTION_PLAY), SEL_ACTION_PLAY},
98 {ID2P(LANG_ACTION_SEEK), SEL_ACTION_SEEK},
99 {ID2P(LANG_ACTION_SKIP), SEL_ACTION_SKIP},
100 {ID2P(LANG_ACTION_DISABLE_UNMAPPED), SEL_ACTION_NOUNMAPPED}
101#if CONFIG_CHARGING
102 ,{ID2P(LANG_ACTION_DISABLE_EXT_POWER), SEL_ACTION_NOEXT}
65#endif 103#endif
104 };
105
106 mask = mask_select(mask, ID2P(LANG_BACKLIGHT_SELECTIVE)
107 , maskitems, ARRAYLEN(maskitems));
108
109 if (mask == SEL_ACTION_NONE || mask == SEL_ACTION_NOEXT)
110 global_settings.bl_selective_actions = false;
111 else if (global_settings.bl_selective_actions_mask != mask)
112 global_settings.bl_selective_actions = true;
113
114 global_settings.bl_selective_actions_mask = mask;
115
116 return true;
117}
118
119#endif /* HAVE_BACKLIGHT */
66#ifdef HAVE_LCD_FLIP 120#ifdef HAVE_LCD_FLIP
67static int flipdisplay_callback(int action,const struct menu_item_ex *this_item) 121static int flipdisplay_callback(int action,const struct menu_item_ex *this_item)
68{ 122{
@@ -88,11 +142,11 @@ static int flipdisplay_callback(int action,const struct menu_item_ex *this_item)
88#ifdef HAVE_BACKLIGHT 142#ifdef HAVE_BACKLIGHT
89MENUITEM_SETTING(backlight_timeout, &global_settings.backlight_timeout, NULL); 143MENUITEM_SETTING(backlight_timeout, &global_settings.backlight_timeout, NULL);
90#if CONFIG_CHARGING 144#if CONFIG_CHARGING
91MENUITEM_SETTING(backlight_timeout_plugged, 145MENUITEM_SETTING(backlight_timeout_plugged,
92 &global_settings.backlight_timeout_plugged, NULL); 146 &global_settings.backlight_timeout_plugged, NULL);
93#endif 147#endif
94#ifdef HAS_BUTTON_HOLD 148#ifdef HAS_BUTTON_HOLD
95MENUITEM_SETTING(backlight_on_button_hold, 149MENUITEM_SETTING(backlight_on_button_hold,
96 &global_settings.backlight_on_button_hold, NULL); 150 &global_settings.backlight_on_button_hold, NULL);
97#endif 151#endif
98MENUITEM_SETTING(caption_backlight, &global_settings.caption_backlight, NULL); 152MENUITEM_SETTING(caption_backlight, &global_settings.caption_backlight, NULL);
@@ -101,9 +155,21 @@ MENUITEM_SETTING(caption_backlight, &global_settings.caption_backlight, NULL);
101MENUITEM_SETTING(backlight_fade_in, &global_settings.backlight_fade_in, NULL); 155MENUITEM_SETTING(backlight_fade_in, &global_settings.backlight_fade_in, NULL);
102MENUITEM_SETTING(backlight_fade_out, &global_settings.backlight_fade_out, NULL); 156MENUITEM_SETTING(backlight_fade_out, &global_settings.backlight_fade_out, NULL);
103#endif 157#endif
104MENUITEM_SETTING(bl_filter_first_keypress, 158MENUITEM_SETTING(bl_filter_first_keypress,
105 &global_settings.bl_filter_first_keypress, 159 &global_settings.bl_filter_first_keypress,
106 filterfirstkeypress_callback); 160 filterfirstkeypress_callback);
161
162MENUITEM_SETTING(bl_selective_actions,
163 &global_settings.bl_selective_actions,
164 selectivebacklight_callback);
165
166MENUITEM_FUNCTION(sel_backlight_mask, 0, ID2P(LANG_SETTINGS),
167 selectivebacklight_set_mask, NULL,
168 selectivebacklight_callback, Icon_Menu_setting);
169
170MAKE_MENU(sel_backlight, ID2P(LANG_BACKLIGHT_SELECTIVE),
171 NULL, Icon_Menu_setting, &bl_selective_actions, &sel_backlight_mask);
172
107#ifdef HAVE_LCD_SLEEP_SETTING 173#ifdef HAVE_LCD_SLEEP_SETTING
108MENUITEM_SETTING(lcd_sleep_after_backlight_off, 174MENUITEM_SETTING(lcd_sleep_after_backlight_off,
109 &global_settings.lcd_sleep_after_backlight_off, NULL); 175 &global_settings.lcd_sleep_after_backlight_off, NULL);
@@ -124,6 +190,8 @@ MENUITEM_SETTING(flip_display, &global_settings.flip_display, flipdisplay_callba
124#endif 190#endif
125#endif /* HAVE_LCD_BITMAP */ 191#endif /* HAVE_LCD_BITMAP */
126 192
193
194
127/* now the actual menu */ 195/* now the actual menu */
128MAKE_MENU(lcd_settings,ID2P(LANG_LCD_MENU), 196MAKE_MENU(lcd_settings,ID2P(LANG_LCD_MENU),
129 NULL, Icon_Display_menu 197 NULL, Icon_Display_menu
@@ -141,6 +209,7 @@ MAKE_MENU(lcd_settings,ID2P(LANG_LCD_MENU),
141 ,&backlight_fade_in, &backlight_fade_out 209 ,&backlight_fade_in, &backlight_fade_out
142#endif 210#endif
143 ,&bl_filter_first_keypress 211 ,&bl_filter_first_keypress
212 ,&sel_backlight
144# ifdef HAVE_LCD_SLEEP_SETTING 213# ifdef HAVE_LCD_SLEEP_SETTING
145 ,&lcd_sleep_after_backlight_off 214 ,&lcd_sleep_after_backlight_off
146# endif 215# endif
@@ -167,31 +236,31 @@ MAKE_MENU(lcd_settings,ID2P(LANG_LCD_MENU),
167/********************************/ 236/********************************/
168/* Remote LCD settings menu */ 237/* Remote LCD settings menu */
169#ifdef HAVE_REMOTE_LCD 238#ifdef HAVE_REMOTE_LCD
170MENUITEM_SETTING(remote_backlight_timeout, 239MENUITEM_SETTING(remote_backlight_timeout,
171 &global_settings.remote_backlight_timeout, NULL); 240 &global_settings.remote_backlight_timeout, NULL);
172 241
173#if CONFIG_CHARGING 242#if CONFIG_CHARGING
174MENUITEM_SETTING(remote_backlight_timeout_plugged, 243MENUITEM_SETTING(remote_backlight_timeout_plugged,
175 &global_settings.remote_backlight_timeout_plugged, NULL); 244 &global_settings.remote_backlight_timeout_plugged, NULL);
176#endif 245#endif
177 246
178#ifdef HAS_REMOTE_BUTTON_HOLD 247#ifdef HAS_REMOTE_BUTTON_HOLD
179MENUITEM_SETTING(remote_backlight_on_button_hold, 248MENUITEM_SETTING(remote_backlight_on_button_hold,
180 &global_settings.remote_backlight_on_button_hold, NULL); 249 &global_settings.remote_backlight_on_button_hold, NULL);
181#endif 250#endif
182 251
183MENUITEM_SETTING(remote_caption_backlight, 252MENUITEM_SETTING(remote_caption_backlight,
184 &global_settings.remote_caption_backlight, NULL); 253 &global_settings.remote_caption_backlight, NULL);
185MENUITEM_SETTING(remote_bl_filter_first_keypress, 254MENUITEM_SETTING(remote_bl_filter_first_keypress,
186 &global_settings.remote_bl_filter_first_keypress, 255 &global_settings.remote_bl_filter_first_keypress,
187 filterfirstkeypress_callback); 256 filterfirstkeypress_callback);
188MENUITEM_SETTING(remote_contrast, 257MENUITEM_SETTING(remote_contrast,
189 &global_settings.remote_contrast, NULL); 258 &global_settings.remote_contrast, NULL);
190MENUITEM_SETTING(remote_invert, 259MENUITEM_SETTING(remote_invert,
191 &global_settings.remote_invert, NULL); 260 &global_settings.remote_invert, NULL);
192 261
193#ifdef HAVE_LCD_FLIP 262#ifdef HAVE_LCD_FLIP
194MENUITEM_SETTING(remote_flip_display, 263MENUITEM_SETTING(remote_flip_display,
195 &global_settings.remote_flip_display, flipdisplay_callback); 264 &global_settings.remote_flip_display, flipdisplay_callback);
196#endif 265#endif
197 266
@@ -207,7 +276,7 @@ static int ticking_callback(int action,const struct menu_item_ex *this_item)
207 } 276 }
208 return action; 277 return action;
209} 278}
210MENUITEM_SETTING(remote_reduce_ticking, 279MENUITEM_SETTING(remote_reduce_ticking,
211 &global_settings.remote_reduce_ticking, ticking_callback); 280 &global_settings.remote_reduce_ticking, ticking_callback);
212#endif 281#endif
213 282
@@ -222,7 +291,7 @@ MAKE_MENU(lcd_remote_settings, ID2P(LANG_LCD_REMOTE_MENU),
222#endif 291#endif
223 &remote_caption_backlight, &remote_bl_filter_first_keypress, 292 &remote_caption_backlight, &remote_bl_filter_first_keypress,
224 &remote_contrast, &remote_invert 293 &remote_contrast, &remote_invert
225 294
226#ifdef HAVE_LCD_FLIP 295#ifdef HAVE_LCD_FLIP
227 ,&remote_flip_display 296 ,&remote_flip_display
228#endif 297#endif
@@ -319,15 +388,15 @@ static int peakmeter_callback(int action,const struct menu_item_ex *this_item)
319 } 388 }
320 return action; 389 return action;
321} 390}
322MENUITEM_SETTING(peak_meter_hold, 391MENUITEM_SETTING(peak_meter_hold,
323 &global_settings.peak_meter_hold, peakmeter_callback); 392 &global_settings.peak_meter_hold, peakmeter_callback);
324MENUITEM_SETTING(peak_meter_clip_hold, 393MENUITEM_SETTING(peak_meter_clip_hold,
325 &global_settings.peak_meter_clip_hold, peakmeter_callback); 394 &global_settings.peak_meter_clip_hold, peakmeter_callback);
326#ifdef HAVE_RECORDING 395#ifdef HAVE_RECORDING
327MENUITEM_SETTING(peak_meter_clipcounter, 396MENUITEM_SETTING(peak_meter_clipcounter,
328 &global_settings.peak_meter_clipcounter, NULL); 397 &global_settings.peak_meter_clipcounter, NULL);
329#endif 398#endif
330MENUITEM_SETTING(peak_meter_release, 399MENUITEM_SETTING(peak_meter_release,
331 &global_settings.peak_meter_release, peakmeter_callback); 400 &global_settings.peak_meter_release, peakmeter_callback);
332/** 401/**
333 * Menu to select wether the scale of the meter 402 * Menu to select wether the scale of the meter
@@ -356,7 +425,7 @@ static int peak_meter_scale(void) {
356 /* we only store -dBfs */ 425 /* we only store -dBfs */
357 global_settings.peak_meter_min = -peak_meter_get_min() / 100; 426 global_settings.peak_meter_min = -peak_meter_get_min() / 100;
358 global_settings.peak_meter_max = -peak_meter_get_max() / 100; 427 global_settings.peak_meter_max = -peak_meter_get_max() / 100;
359 428
360 /* limit the returned value to the allowed range */ 429 /* limit the returned value to the allowed range */
361 if(global_settings.peak_meter_min > 89) 430 if(global_settings.peak_meter_min > 89)
362 global_settings.peak_meter_min = 89; 431 global_settings.peak_meter_min = 89;
@@ -472,12 +541,12 @@ MENUITEM_FUNCTION(histogram, 0,
472 541
473MENUITEM_FUNCTION(peak_meter_scale_item, 0, ID2P(LANG_PM_SCALE), 542MENUITEM_FUNCTION(peak_meter_scale_item, 0, ID2P(LANG_PM_SCALE),
474 peak_meter_scale, NULL, NULL, Icon_NOICON); 543 peak_meter_scale, NULL, NULL, Icon_NOICON);
475MENUITEM_FUNCTION(peak_meter_min_item, 0, ID2P(LANG_PM_MIN), 544MENUITEM_FUNCTION(peak_meter_min_item, 0, ID2P(LANG_PM_MIN),
476 peak_meter_min, NULL, NULL, Icon_NOICON); 545 peak_meter_min, NULL, NULL, Icon_NOICON);
477MENUITEM_FUNCTION(peak_meter_max_item, 0, ID2P(LANG_PM_MAX), 546MENUITEM_FUNCTION(peak_meter_max_item, 0, ID2P(LANG_PM_MAX),
478 peak_meter_max, NULL, NULL, Icon_NOICON); 547 peak_meter_max, NULL, NULL, Icon_NOICON);
479MAKE_MENU(peak_meter_menu, ID2P(LANG_PM_MENU), NULL, Icon_NOICON, 548MAKE_MENU(peak_meter_menu, ID2P(LANG_PM_MENU), NULL, Icon_NOICON,
480 &peak_meter_release, &peak_meter_hold, 549 &peak_meter_release, &peak_meter_hold,
481 &peak_meter_clip_hold, 550 &peak_meter_clip_hold,
482#ifdef HAVE_RECORDING 551#ifdef HAVE_RECORDING
483 &peak_meter_clipcounter, 552 &peak_meter_clipcounter,
diff --git a/apps/menus/settings_menu.c b/apps/menus/settings_menu.c
index f42550cc6a..5c99cb4cd4 100644
--- a/apps/menus/settings_menu.c
+++ b/apps/menus/settings_menu.c
@@ -49,12 +49,67 @@
49#include "dircache.h" 49#include "dircache.h"
50#endif 50#endif
51#include "folder_select.h" 51#include "folder_select.h"
52 52#ifndef HAS_BUTTON_HOLD
53#include "mask_select.h"
54#endif
53#if defined(DX50) || defined(DX90) 55#if defined(DX50) || defined(DX90)
54#include "governor-ibasso.h" 56#include "governor-ibasso.h"
55#include "usb-ibasso.h" 57#include "usb-ibasso.h"
56#endif 58#endif
57 59
60#ifndef HAS_BUTTON_HOLD
61static int selectivesoftlock_callback(int action,
62 const struct menu_item_ex *this_item)
63{
64 (void)this_item;
65
66 switch (action)
67 {
68 case ACTION_STD_MENU:
69 case ACTION_STD_CANCEL:
70 case ACTION_EXIT_MENUITEM:
71 set_selective_softlock_actions(
72 global_settings.bt_selective_softlock_actions,
73 global_settings.bt_selective_softlock_actions_mask);
74 break;
75 }
76
77 return action;
78}
79
80static int selectivesoftlock_set_mask(void* param)
81{
82 (void)param;
83int mask = global_settings.bt_selective_softlock_actions_mask;
84 struct s_mask_items maskitems[]={
85 {ID2P(LANG_VOLUME) , SEL_ACTION_VOL},
86 {ID2P(LANG_ACTION_PLAY), SEL_ACTION_PLAY},
87 {ID2P(LANG_ACTION_SEEK), SEL_ACTION_SEEK},
88 {ID2P(LANG_ACTION_SKIP), SEL_ACTION_SKIP},
89 #ifdef HAVE_BACKLIGHT
90 {ID2P(LANG_ACTION_AUTOLOCK_ON), SEL_ACTION_AUTOLOCK},
91 #endif
92 #if defined(HAVE_TOUCHPAD) || defined(HAVE_TOUCHSCREEN)
93 {ID2P(LANG_ACTION_DISABLE_TOUCH) , SEL_ACTION_NOTOUCH},
94 #endif
95 {ID2P(LANG_ACTION_DISABLE_NOTIFY), SEL_ACTION_NONOTIFY}
96 };
97
98 mask = mask_select(mask, ID2P(LANG_SOFTLOCK_SELECTIVE)
99 , maskitems,ARRAYLEN(maskitems));
100
101 if (mask == SEL_ACTION_NONE)
102 global_settings.bt_selective_softlock_actions = false;
103 else if (global_settings.bt_selective_softlock_actions_mask != mask)
104 global_settings.bt_selective_softlock_actions = true;
105
106 global_settings.bt_selective_softlock_actions_mask = mask;
107
108 return true;
109}
110
111#endif /* !HAS_BUTTON_HOLD */
112
58/***********************************/ 113/***********************************/
59/* TAGCACHE MENU */ 114/* TAGCACHE MENU */
60#ifdef HAVE_TAGCACHE 115#ifdef HAVE_TAGCACHE
@@ -137,7 +192,7 @@ static int clear_start_directory(void)
137 splash(HZ, ID2P(LANG_RESET_DONE_CLEAR)); 192 splash(HZ, ID2P(LANG_RESET_DONE_CLEAR));
138 return false; 193 return false;
139} 194}
140MENUITEM_FUNCTION(clear_start_directory_item, 0, ID2P(LANG_RESET_START_DIR), 195MENUITEM_FUNCTION(clear_start_directory_item, 0, ID2P(LANG_RESET_START_DIR),
141 clear_start_directory, NULL, NULL, Icon_file_view_menu); 196 clear_start_directory, NULL, NULL, Icon_file_view_menu);
142static int fileview_callback(int action,const struct menu_item_ex *this_item) 197static int fileview_callback(int action,const struct menu_item_ex *this_item)
143{ 198{
@@ -330,6 +385,19 @@ MENUITEM_SETTING(touchpad_deadzone, &global_settings.touchpad_deadzone, NULL);
330MENUITEM_SETTING(shortcuts_replaces_quickscreen, &global_settings.shortcuts_replaces_qs, NULL); 385MENUITEM_SETTING(shortcuts_replaces_quickscreen, &global_settings.shortcuts_replaces_qs, NULL);
331#endif 386#endif
332 387
388#ifndef HAS_BUTTON_HOLD
389
390MENUITEM_SETTING(bt_selective_actions,
391 &global_settings.bt_selective_softlock_actions,
392 selectivesoftlock_callback);
393MENUITEM_FUNCTION(sel_softlock_mask, 0, ID2P(LANG_SETTINGS),
394 selectivesoftlock_set_mask, NULL,
395 selectivesoftlock_callback, Icon_Menu_setting);
396
397MAKE_MENU(sel_softlock, ID2P(LANG_SOFTLOCK_SELECTIVE),
398 NULL, Icon_Menu_setting, &bt_selective_actions, &sel_softlock_mask);
399#endif /* !HAS_BUTTON_HOLD */
400
333#if defined(DX50) || defined(DX90) 401#if defined(DX50) || defined(DX90)
334MENUITEM_SETTING(governor, &global_settings.governor, NULL); 402MENUITEM_SETTING(governor, &global_settings.governor, NULL);
335MENUITEM_SETTING(usb_mode, &global_settings.usb_mode, NULL); 403MENUITEM_SETTING(usb_mode, &global_settings.usb_mode, NULL);
@@ -380,6 +448,9 @@ MAKE_MENU(system_menu, ID2P(LANG_SYSTEM),
380#ifdef HAVE_TOUCHPAD_DEADZONE 448#ifdef HAVE_TOUCHPAD_DEADZONE
381 &touchpad_deadzone, 449 &touchpad_deadzone,
382#endif 450#endif
451#ifndef HAS_BUTTON_HOLD
452 &sel_softlock,
453#endif
383#ifdef USB_ENABLE_HID 454#ifdef USB_ENABLE_HID
384 &usb_hid, 455 &usb_hid,
385 &usb_keypad_mode, 456 &usb_keypad_mode,
@@ -544,7 +615,7 @@ MAKE_MENU(bookmark_settings_menu, ID2P(LANG_BOOKMARK_SETTINGS), 0,
544/***********************************/ 615/***********************************/
545/* AUTORESUME MENU */ 616/* AUTORESUME MENU */
546#ifdef HAVE_TAGCACHE 617#ifdef HAVE_TAGCACHE
547#if CONFIG_CODEC == SWCODEC 618#if CONFIG_CODEC == SWCODEC
548 619
549static int autoresume_callback(int action, const struct menu_item_ex *this_item) 620static int autoresume_callback(int action, const struct menu_item_ex *this_item)
550{ 621{
@@ -557,7 +628,7 @@ static int autoresume_callback(int action, const struct menu_item_ex *this_item)
557 static const char *lines[] = {ID2P(LANG_TAGCACHE_BUSY), 628 static const char *lines[] = {ID2P(LANG_TAGCACHE_BUSY),
558 ID2P(LANG_TAGCACHE_FORCE_UPDATE)}; 629 ID2P(LANG_TAGCACHE_FORCE_UPDATE)};
559 static const struct text_message message = {lines, 2}; 630 static const struct text_message message = {lines, 2};
560 631
561 if (gui_syncyesno_run(&message, NULL, NULL) == YESNO_YES) 632 if (gui_syncyesno_run(&message, NULL, NULL) == YESNO_YES)
562 tagcache_rebuild_with_splash(); 633 tagcache_rebuild_with_splash();
563 } 634 }
@@ -672,9 +743,9 @@ MAKE_MENU(settings_menu_item, ID2P(LANG_GENERAL_SETTINGS), 0,
672 &startup_shutdown_menu, 743 &startup_shutdown_menu,
673 &bookmark_settings_menu, 744 &bookmark_settings_menu,
674#ifdef HAVE_TAGCACHE 745#ifdef HAVE_TAGCACHE
675#if CONFIG_CODEC == SWCODEC 746#if CONFIG_CODEC == SWCODEC
676 &autoresume_menu, 747 &autoresume_menu,
677#endif 748#endif
678#endif 749#endif
679 &browse_langs, &voice_settings_menu, 750 &browse_langs, &voice_settings_menu,
680#ifdef HAVE_HOTKEY 751#ifdef HAVE_HOTKEY