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
This commit is contained in:
Solomon Peachy 2023-10-01 09:57:08 -04:00
parent 17a8a54780
commit 57713f6308
5 changed files with 92 additions and 12 deletions

View file

@ -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 */