summaryrefslogtreecommitdiff
path: root/apps/plugins/lib/keymaps.h
diff options
context:
space:
mode:
authorFranklin Wei <git@fwei.tk>2017-09-30 20:50:33 -0400
committerFranklin Wei <git@fwei.tk>2017-09-30 20:50:33 -0400
commit23e7d0ef19dc82e39f249a4cd65ec797a6c06aba (patch)
tree73d7b786e6255ae703786f98c3d3df0c5341a5dd /apps/plugins/lib/keymaps.h
parentbb55fceb7020e3235d4b5c33976d9b9d10dc091a (diff)
xworld: support diagonal buttons on Zen X-Fi
Change-Id: Ia738ecd2a39c0c0772d6f939d549dd5d0eda055e
Diffstat (limited to 'apps/plugins/lib/keymaps.h')
-rw-r--r--apps/plugins/lib/keymaps.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/apps/plugins/lib/keymaps.h b/apps/plugins/lib/keymaps.h
index 84041cacd7..2c54aebccb 100644
--- a/apps/plugins/lib/keymaps.h
+++ b/apps/plugins/lib/keymaps.h
@@ -68,12 +68,23 @@
#define BTN_RIGHT BUTTON_RIGHT
#if (CONFIG_KEYPAD == SANSA_FUZEPLUS_PAD)
+#define BTN_HAVE_DIAGONAL
#define BTN_UP_LEFT BUTTON_BACK
#define BTN_UP_RIGHT BUTTON_PLAYPAUSE
#define BTN_DOWN_LEFT BUTTON_BOTTOMLEFT
#define BTN_DOWN_RIGHT BUTTON_BOTTOMRIGHT
#endif
+/* X-Fi doesn't have a separate *_PAD macro */
+#ifdef CREATIVE_ZENXFI
+#define BTN_HAVE_DIAGONAL
+#define BTN_DOWN_LEFT BUTTON_BOTTOMLEFT
+#define BTN_DOWN_RIGHT BUTTON_BOTTOMRIGHT
+#define BTN_UP_LEFT BUTTON_TOPLEFT
+#define BTN_UP_RIGHT BUTTON_TOPRIGHT
+#endif
+
+
#if (CONFIG_KEYPAD == HM60X_PAD)
#define BTN_FIRE BUTTON_POWER
#define BTN_PAUSE BUTTON_SELECT