From 28cce684a3f433200e5257eb929ee8d7a63b67ff Mon Sep 17 00:00:00 2001 From: Björn Stenberg Date: Wed, 23 Apr 2003 09:21:37 +0000 Subject: Changed remote control button events to separate codes. Now the remote control works while keys are locked. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3586 a1c6a512-1295-4272-9138-f99709370657 --- apps/tree.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'apps/tree.c') diff --git a/apps/tree.c b/apps/tree.c index a29cc5e420..7abafe8f4a 100644 --- a/apps/tree.c +++ b/apps/tree.c @@ -521,6 +521,7 @@ bool ask_resume(void) switch (button_get(true)) { case BUTTON_PLAY: + case BUTTON_RC_PLAY: return true; case SYS_USB_CONNECTED: @@ -686,6 +687,7 @@ static bool handle_on(int* ds, int* dc, int numentries, int tree_max_on_screen) while (!exit) { switch (button_get(true)) { case TREE_PREV: + case BUTTON_RC_LEFT: case BUTTON_ON | TREE_PREV: case BUTTON_ON | TREE_PREV | BUTTON_REPEAT: used = true; @@ -699,6 +701,7 @@ static bool handle_on(int* ds, int* dc, int numentries, int tree_max_on_screen) break; case TREE_NEXT: + case BUTTON_RC_RIGHT: case BUTTON_ON | TREE_NEXT: case BUTTON_ON | TREE_NEXT | BUTTON_REPEAT: used = true; @@ -714,6 +717,7 @@ static bool handle_on(int* ds, int* dc, int numentries, int tree_max_on_screen) case BUTTON_PLAY: + case BUTTON_RC_PLAY: case BUTTON_ON | BUTTON_PLAY: if (currdir[1]) snprintf(buf, sizeof buf, "%s/%s", @@ -804,6 +808,7 @@ bool dirbrowse(char *root) button = button_get_w_tmo(HZ/5); switch ( button ) { case TREE_EXIT: + case BUTTON_RC_STOP: case TREE_EXIT | BUTTON_REPEAT: i=strlen(currdir); if (i>1) { @@ -848,6 +853,7 @@ bool dirbrowse(char *root) case TREE_ENTER: case TREE_ENTER | BUTTON_REPEAT: + case BUTTON_RC_PLAY: #ifdef HAVE_RECORDER_KEYPAD case BUTTON_PLAY: case BUTTON_PLAY | BUTTON_REPEAT: @@ -1005,7 +1011,7 @@ bool dirbrowse(char *root) case TREE_PREV: case TREE_PREV | BUTTON_REPEAT: - case BUTTON_VOL_UP: + case BUTTON_RC_VOL_UP: if(filesindir) { if(dircursor) { put_cursorxy(CURSOR_X, CURSOR_Y + dircursor, false); @@ -1043,7 +1049,7 @@ bool dirbrowse(char *root) case TREE_NEXT: case TREE_NEXT | BUTTON_REPEAT: - case BUTTON_VOL_DOWN: + case BUTTON_RC_VOL_DOWN: if(filesindir) { if (dircursor + dirstart + 1 < numentries ) { -- cgit v1.2.3