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
This commit is contained in:
Thomas Martitz 2012-01-26 23:48:54 +01:00
parent b8439f2aea
commit fab7264b3b
1 changed files with 12 additions and 0 deletions

View File

@ -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;
}