summaryrefslogtreecommitdiffstats
path: root/firmware/target
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/target')
-rw-r--r--firmware/target/hosted/xduoo/button-xduoo.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/firmware/target/hosted/xduoo/button-xduoo.c b/firmware/target/hosted/xduoo/button-xduoo.c
index 568ad2614d..c06b60bd9f 100644
--- a/firmware/target/hosted/xduoo/button-xduoo.c
+++ b/firmware/target/hosted/xduoo/button-xduoo.c
@@ -58,13 +58,13 @@ int button_map(int keycode)
#if defined(XDUOO_X3II) && defined(USE_REMOTE) /* Headphone remote */
case KEY_NEXTSONG:
- return (BUTTON_NEXT | BUTTON_DELAY_RELEASE);
+ return headphones_inserted()? (BUTTON_NEXT | BUTTON_DELAY_RELEASE) : 0;
case KEY_PLAYPAUSE:
- return (BUTTON_PLAY | BUTTON_DELAY_RELEASE);
+ return headphones_inserted()? (BUTTON_PLAY | BUTTON_DELAY_RELEASE) : 0;
case KEY_PREVIOUSSONG:
- return (BUTTON_PREV | BUTTON_DELAY_RELEASE);
+ return headphones_inserted()? (BUTTON_PREV | BUTTON_DELAY_RELEASE) : 0;
#endif
default: