summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSolomon Peachy <pizza@shaftnet.org>2021-03-27 14:42:40 -0400
committerSolomon Peachy <pizza@shaftnet.org>2021-03-27 14:43:17 -0400
commitc96dc1c886b9737a3886961212fabab76551919f (patch)
tree18fba7ae10dd887024e1c72af6d29b11ee302273
parentea1aef9b82c91f93eb0bacccab7b213c374f18f5 (diff)
downloadrockbox-c96dc1c886.tar.gz
rockbox-c96dc1c886.zip
xduoox3ii: Wrap the remote key detection in USE_REMOTE
Makes it straightforward to disable for debugging or defective hardware Change-Id: Ie72786f6e9eabf396a05ef8a02e422c34c97691a
-rw-r--r--firmware/target/hosted/xduoo/button-xduoo.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/firmware/target/hosted/xduoo/button-xduoo.c b/firmware/target/hosted/xduoo/button-xduoo.c
index 2daa7da16b..568ad2614d 100644
--- a/firmware/target/hosted/xduoo/button-xduoo.c
+++ b/firmware/target/hosted/xduoo/button-xduoo.c
@@ -26,6 +26,8 @@
#include "kernel.h"
#include "xduoolinux_codec.h"
+#define USE_REMOTE /* Comment out to disable headphone remote */
+
int button_map(int keycode)
{
switch(keycode)
@@ -54,7 +56,7 @@ int button_map(int keycode)
case KEY_POWER:
return BUTTON_POWER;
-#if defined(XDUOO_X3II) /* Headphone remote */
+#if defined(XDUOO_X3II) && defined(USE_REMOTE) /* Headphone remote */
case KEY_NEXTSONG:
return (BUTTON_NEXT | BUTTON_DELAY_RELEASE);