mirror of
https://github.com/Rockbox/rockbox.git
synced 2026-07-10 13:29:52 -04:00
[FixRed] Tree Hotkey on devices without HAVE_HOTKEY
Change-Id: I36f2fd8fc5edb2ac019a176cb9d3a3d014f1970d
This commit is contained in:
parent
21e9d3f449
commit
e471fe4115
2 changed files with 10 additions and 2 deletions
|
|
@ -1617,9 +1617,10 @@ int hotkey_run_menu(intptr_t flag, bool execute, int current_action)
|
|||
struct hk_menu_data data = {hk_menu, execute ? 1 : 0};
|
||||
|
||||
char *title = str(LANG_ONPLAY_MENU_TITLE);
|
||||
#ifdef HAVE_HOTKEY
|
||||
if (flag & HOTKEY_FLAG_TREE)
|
||||
title = str(LANG_HOTKEY_FILE_BROWSER);
|
||||
|
||||
#endif
|
||||
struct simplelist_info info;
|
||||
int selected = 0;
|
||||
int count = 0;
|
||||
|
|
@ -1798,12 +1799,14 @@ static int hotkey_menu_do_setting(void *param, int *setting, int flag)
|
|||
int wps_context_menu_do_setting(void *param)
|
||||
{
|
||||
return hotkey_menu_do_setting(param, &global_settings.context_wps, HOTKEY_FLAG_WPS);
|
||||
}
|
||||
|
||||
}
|
||||
#ifdef HAVE_HOTKEY
|
||||
int tree_context_menu_do_setting(void *param)
|
||||
{
|
||||
return hotkey_menu_do_setting(param, &global_settings.hotkey_tree, HOTKEY_FLAG_TREE);
|
||||
}
|
||||
#endif
|
||||
|
||||
void wps_context_menu_load_from_cfg(void* setting, char *value)
|
||||
{
|
||||
|
|
@ -1837,8 +1840,11 @@ char* wps_context_menu_write_to_cfg(void* setting, char*buf, int buf_len)
|
|||
{
|
||||
int var = *(int*)setting;
|
||||
int items = HK_CTX_ITEMS;
|
||||
|
||||
#ifdef HAVE_HOTKEY
|
||||
if (setting == &global_settings.hotkey_tree)
|
||||
items = 1;
|
||||
#endif
|
||||
|
||||
unsigned int written;
|
||||
char *buffer = buf;
|
||||
|
|
|
|||
|
|
@ -95,7 +95,9 @@ void onplay_show_playlist_cat_menu(const char* track_name, int attr,
|
|||
void onplay_show_playlist_menu(const char* path, int attr, void (*playlist_insert_cb));
|
||||
|
||||
int wps_context_menu_do_setting(void *param);
|
||||
#ifdef HAVE_HOTKEY
|
||||
int tree_context_menu_do_setting(void *param);
|
||||
#endif
|
||||
void wps_context_menu_set_default(void* setting, void* defaultval);
|
||||
char* wps_context_menu_write_to_cfg(void* setting, char*buf, int buf_len);
|
||||
void wps_context_menu_load_from_cfg(void* setting, char *value);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue