From 57713f6308b2ac09e05684930825650b96cc325c Mon Sep 17 00:00:00 2001 From: Solomon Peachy Date: Sun, 1 Oct 2023 09:57:08 -0400 Subject: ipod: Support IAP remote MENU/SELECT/UP/DOWN keys in MODE2 Only the primary contexts (standard, wps, quckscreen, tree, radio) handle the new keys so far. Todo contexts: Settings, keyboard, pitchscreen, bookmark, & recording. Available docs for MODE4 don't list anything other than playback controls, so it's not clear if there is a path forward here. Change-Id: I91908092f75d96813e2e155e447129ba15f58051 --- apps/iap/iap-lingo2.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'apps/iap/iap-lingo2.c') diff --git a/apps/iap/iap-lingo2.c b/apps/iap/iap-lingo2.c index 946e51222d..51f951c6d9 100644 --- a/apps/iap/iap-lingo2.c +++ b/apps/iap/iap-lingo2.c @@ -187,6 +187,17 @@ void iap_handlepkt_mode2(const unsigned int len, const unsigned char *buf) REMOTE_BUTTON(BUTTON_RC_RIGHT); if(buf[4] & 32) /* frwd */ REMOTE_BUTTON(BUTTON_RC_LEFT); + if(buf[4] & 64) /* menu */ + REMOTE_BUTTON(BUTTON_RC_MENU); + if(buf[4] & 128) /* select */ + REMOTE_BUTTON(BUTTON_RC_SELECT); + } + else if(len >= 6 && buf[5] != 0) + { + if(buf[5] & 1) /* up */ + REMOTE_BUTTON(BUTTON_RC_UP); + if (buf[5] & 2) /* down */ + REMOTE_BUTTON(BUTTON_RC_DOWN); } /* power on released */ -- cgit v1.2.3