From fab7264b3b4d6bef1ae3d181693fd37a558df918 Mon Sep 17 00:00:00 2001 From: Thomas Martitz Date: Thu, 26 Jan 2012 23:48:54 +0100 Subject: 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 --- apps/menu.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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; } -- cgit v1.2.3