summaryrefslogtreecommitdiffstats
path: root/apps/menu.c
diff options
context:
space:
mode:
authorThomas Martitz <kugel@rockbox.org>2012-01-26 23:48:54 +0100
committerThomas Martitz <kugel@rockbox.org>2012-01-27 09:15:05 +0100
commitfab7264b3b4d6bef1ae3d181693fd37a558df918 (patch)
tree755dc63f910891bc96a0ca504f58358dacc144f8 /apps/menu.c
parentb8439f2aeab3920eeeabfbf2c5cf15979619410b (diff)
downloadrockbox-fab7264b3b4d6bef1ae3d181693fd37a558df918.tar.gz
rockbox-fab7264b3b4d6bef1ae3d181693fd37a558df918.tar.bz2
rockbox-fab7264b3b4d6bef1ae3d181693fd37a558df918.zip
Force settings touchscreen mode in menus.
Plugins revert to grid mode currently. If they create a list the list ends up in grid mode as well even if they use point mode due to settings in the core. The expectation is that the lists use whatever mode they also use in the core. Force setting in menu to have them behave the same in core and plugins. Change-Id: I9534b2f21ccfa920eb2e48f66b04ecbda7a59011
Diffstat (limited to 'apps/menu.c')
-rw-r--r--apps/menu.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/apps/menu.c b/apps/menu.c
index ae318b2ffc..b813f03dce 100644
--- a/apps/menu.c
+++ b/apps/menu.c
@@ -338,6 +338,13 @@ int do_menu(const struct menu_item_ex *start_menu, int *start_selected,
int ret = 0;
bool redraw_lists;
int old_audio_status = audio_status();
+
+#ifdef HAVE_TOUCHSCREEN
+ /* plugins possibly have grid mode active. force global settings in lists */
+ enum touchscreen_mode tsm = touchscreen_get_mode();
+ touchscreen_set_mode(global_settings.touch_mode);
+#endif
+
FOR_NB_SCREENS(i)
viewportmanager_theme_enable(i, !hide_theme, NULL);
@@ -697,7 +704,12 @@ int do_menu(const struct menu_item_ex *start_menu, int *start_selected,
*start_selected = get_menu_selection(
gui_synclist_get_sel_pos(&lists), menu);
}
+
FOR_NB_SCREENS(i)
viewportmanager_theme_undo(i, false);
+#ifdef HAVE_TOUCHSCREEN
+ touchscreen_set_mode(tsm);
+#endif
+
return ret;
}