diff options
author | Jonathan Gordon <rockbox@jdgordon.info> | 2012-01-19 19:35:19 +1100 |
---|---|---|
committer | Jonathan Gordon <rockbox@jdgordon.info> | 2012-01-23 07:42:28 +1100 |
commit | 8a3af263641dfa6e6bd8f9dfe06654c4e27b094e (patch) | |
tree | 3b4100bcd7cb0bd457041c8933a928ed87c30614 | |
parent | 7efbd632c2ee76e6868635ecfa09ea96b25c3a63 (diff) | |
download | rockbox-8a3af263641dfa6e6bd8f9dfe06654c4e27b094e.tar.gz rockbox-8a3af263641dfa6e6bd8f9dfe06654c4e27b094e.zip |
skin touchregions: fix the 'none' region firing when it shouldnt.
Change the none action return value so the various action layers don't get confused by ACTION_TOUCHSCREEN return codes which shouldn't be happening (i.e when a long press region overlaps a short press region whihc has the none action)
Change-Id: I63db2c0b49597ada2c5ebd0ef98e99aeef4f522a
-rw-r--r-- | apps/action.h | 3 | ||||
-rw-r--r-- | apps/gui/skin_engine/skin_parser.c | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/apps/action.h b/apps/action.h index ccf3313841..e46e4a64b2 100644 --- a/apps/action.h +++ b/apps/action.h | |||
@@ -92,7 +92,8 @@ enum { | |||
92 | ACTION_REDRAW, /* returned if keys are locked and we splash()'ed */ | 92 | ACTION_REDRAW, /* returned if keys are locked and we splash()'ed */ |
93 | ACTION_TOUCHSCREEN, | 93 | ACTION_TOUCHSCREEN, |
94 | ACTION_TOUCHSCREEN_MODE, /* toggle the touchscreen mode */ | 94 | ACTION_TOUCHSCREEN_MODE, /* toggle the touchscreen mode */ |
95 | 95 | ACTION_TOUCHSCREEN_IGNORE, /* used for the 'none' action in skins */ | |
96 | |||
96 | /* standard actions, use these first */ | 97 | /* standard actions, use these first */ |
97 | ACTION_STD_PREV, | 98 | ACTION_STD_PREV, |
98 | ACTION_STD_PREVREPEAT, | 99 | ACTION_STD_PREVREPEAT, |
diff --git a/apps/gui/skin_engine/skin_parser.c b/apps/gui/skin_engine/skin_parser.c index 0118977be5..95dc11c7d1 100644 --- a/apps/gui/skin_engine/skin_parser.c +++ b/apps/gui/skin_engine/skin_parser.c | |||
@@ -1242,7 +1242,7 @@ static int parse_lasttouch(struct skin_element *element, | |||
1242 | struct touchaction {const char* s; int action;}; | 1242 | struct touchaction {const char* s; int action;}; |
1243 | static const struct touchaction touchactions[] = { | 1243 | static const struct touchaction touchactions[] = { |
1244 | /* generic actions, convert to screen actions on use */ | 1244 | /* generic actions, convert to screen actions on use */ |
1245 | {"none", ACTION_TOUCHSCREEN}, {"lock", ACTION_TOUCH_SOFTLOCK }, | 1245 | {"none", ACTION_TOUCHSCREEN_IGNORE},{"lock", ACTION_TOUCH_SOFTLOCK }, |
1246 | {"prev", ACTION_STD_PREV }, {"next", ACTION_STD_NEXT }, | 1246 | {"prev", ACTION_STD_PREV }, {"next", ACTION_STD_NEXT }, |
1247 | {"rwd", ACTION_STD_PREVREPEAT }, {"ffwd", ACTION_STD_NEXTREPEAT }, | 1247 | {"rwd", ACTION_STD_PREVREPEAT }, {"ffwd", ACTION_STD_NEXTREPEAT }, |
1248 | {"hotkey", ACTION_STD_HOTKEY}, {"select", ACTION_STD_OK }, | 1248 | {"hotkey", ACTION_STD_HOTKEY}, {"select", ACTION_STD_OK }, |