From 9a7a542de2cac4293a7834ecaebaa4dd14206683 Mon Sep 17 00:00:00 2001 From: Jonathan Gordon Date: Tue, 15 Jun 2010 08:38:23 +0000 Subject: first step of making touch regions usable in all skins, not just the WPS.. no user viewable changes just yet git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26854 a1c6a512-1295-4272-9138-f99709370657 --- apps/gui/wps.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'apps/gui/wps.c') diff --git a/apps/gui/wps.c b/apps/gui/wps.c index 33e9b2167f..0c7975a01a 100644 --- a/apps/gui/wps.c +++ b/apps/gui/wps.c @@ -728,8 +728,28 @@ int wps_get_touchaction(struct wps_data *data) if (released) wps_disarm_touchregions(data); + /* Now we need to convert buttons to the WPS context */ + switch (returncode) + { + case ACTION_STD_PREV: + return ACTION_WPS_SKIPPREV; + case ACTION_STD_PREVREPEAT: + return ACTION_WPS_SEEKBACK; + case ACTION_STD_NEXT: + return ACTION_WPS_SKIPNEXT; + case ACTION_STD_NEXTREPEAT: + return ACTION_WPS_SEEKFWD; + case ACTION_STD_MENU: + return ACTION_WPS_MENU; + case ACTION_STD_CONTEXT: + return ACTION_WPS_CONTEXT; + case ACTION_STD_QUICKSCREEN: + return ACTION_WPS_QUICKSCREEN; + } + if (returncode != ACTION_NONE) return returncode; + if ((last_action == ACTION_WPS_SEEKBACK || last_action == ACTION_WPS_SEEKFWD)) return ACTION_WPS_STOPSEEK; -- cgit v1.2.3