diff options
author | Björn Stenberg <bjorn@haxx.se> | 2003-04-23 09:21:37 +0000 |
---|---|---|
committer | Björn Stenberg <bjorn@haxx.se> | 2003-04-23 09:21:37 +0000 |
commit | 28cce684a3f433200e5257eb929ee8d7a63b67ff (patch) | |
tree | 6afe48a8bd53bac805e6ae19dd58f6843af5ccf1 /apps/tree.c | |
parent | 86587527f52db8320f8d8ea48dfc76d3d93d79c8 (diff) | |
download | rockbox-28cce684a3f433200e5257eb929ee8d7a63b67ff.tar.gz rockbox-28cce684a3f433200e5257eb929ee8d7a63b67ff.zip |
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
Diffstat (limited to 'apps/tree.c')
-rw-r--r-- | apps/tree.c | 10 |
1 files changed, 8 insertions, 2 deletions
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) | |||
521 | 521 | ||
522 | switch (button_get(true)) { | 522 | switch (button_get(true)) { |
523 | case BUTTON_PLAY: | 523 | case BUTTON_PLAY: |
524 | case BUTTON_RC_PLAY: | ||
524 | return true; | 525 | return true; |
525 | 526 | ||
526 | case SYS_USB_CONNECTED: | 527 | case SYS_USB_CONNECTED: |
@@ -686,6 +687,7 @@ static bool handle_on(int* ds, int* dc, int numentries, int tree_max_on_screen) | |||
686 | while (!exit) { | 687 | while (!exit) { |
687 | switch (button_get(true)) { | 688 | switch (button_get(true)) { |
688 | case TREE_PREV: | 689 | case TREE_PREV: |
690 | case BUTTON_RC_LEFT: | ||
689 | case BUTTON_ON | TREE_PREV: | 691 | case BUTTON_ON | TREE_PREV: |
690 | case BUTTON_ON | TREE_PREV | BUTTON_REPEAT: | 692 | case BUTTON_ON | TREE_PREV | BUTTON_REPEAT: |
691 | used = true; | 693 | used = true; |
@@ -699,6 +701,7 @@ static bool handle_on(int* ds, int* dc, int numentries, int tree_max_on_screen) | |||
699 | break; | 701 | break; |
700 | 702 | ||
701 | case TREE_NEXT: | 703 | case TREE_NEXT: |
704 | case BUTTON_RC_RIGHT: | ||
702 | case BUTTON_ON | TREE_NEXT: | 705 | case BUTTON_ON | TREE_NEXT: |
703 | case BUTTON_ON | TREE_NEXT | BUTTON_REPEAT: | 706 | case BUTTON_ON | TREE_NEXT | BUTTON_REPEAT: |
704 | used = true; | 707 | used = true; |
@@ -714,6 +717,7 @@ static bool handle_on(int* ds, int* dc, int numentries, int tree_max_on_screen) | |||
714 | 717 | ||
715 | 718 | ||
716 | case BUTTON_PLAY: | 719 | case BUTTON_PLAY: |
720 | case BUTTON_RC_PLAY: | ||
717 | case BUTTON_ON | BUTTON_PLAY: | 721 | case BUTTON_ON | BUTTON_PLAY: |
718 | if (currdir[1]) | 722 | if (currdir[1]) |
719 | snprintf(buf, sizeof buf, "%s/%s", | 723 | snprintf(buf, sizeof buf, "%s/%s", |
@@ -804,6 +808,7 @@ bool dirbrowse(char *root) | |||
804 | button = button_get_w_tmo(HZ/5); | 808 | button = button_get_w_tmo(HZ/5); |
805 | switch ( button ) { | 809 | switch ( button ) { |
806 | case TREE_EXIT: | 810 | case TREE_EXIT: |
811 | case BUTTON_RC_STOP: | ||
807 | case TREE_EXIT | BUTTON_REPEAT: | 812 | case TREE_EXIT | BUTTON_REPEAT: |
808 | i=strlen(currdir); | 813 | i=strlen(currdir); |
809 | if (i>1) { | 814 | if (i>1) { |
@@ -848,6 +853,7 @@ bool dirbrowse(char *root) | |||
848 | 853 | ||
849 | case TREE_ENTER: | 854 | case TREE_ENTER: |
850 | case TREE_ENTER | BUTTON_REPEAT: | 855 | case TREE_ENTER | BUTTON_REPEAT: |
856 | case BUTTON_RC_PLAY: | ||
851 | #ifdef HAVE_RECORDER_KEYPAD | 857 | #ifdef HAVE_RECORDER_KEYPAD |
852 | case BUTTON_PLAY: | 858 | case BUTTON_PLAY: |
853 | case BUTTON_PLAY | BUTTON_REPEAT: | 859 | case BUTTON_PLAY | BUTTON_REPEAT: |
@@ -1005,7 +1011,7 @@ bool dirbrowse(char *root) | |||
1005 | 1011 | ||
1006 | case TREE_PREV: | 1012 | case TREE_PREV: |
1007 | case TREE_PREV | BUTTON_REPEAT: | 1013 | case TREE_PREV | BUTTON_REPEAT: |
1008 | case BUTTON_VOL_UP: | 1014 | case BUTTON_RC_VOL_UP: |
1009 | if(filesindir) { | 1015 | if(filesindir) { |
1010 | if(dircursor) { | 1016 | if(dircursor) { |
1011 | put_cursorxy(CURSOR_X, CURSOR_Y + dircursor, false); | 1017 | put_cursorxy(CURSOR_X, CURSOR_Y + dircursor, false); |
@@ -1043,7 +1049,7 @@ bool dirbrowse(char *root) | |||
1043 | 1049 | ||
1044 | case TREE_NEXT: | 1050 | case TREE_NEXT: |
1045 | case TREE_NEXT | BUTTON_REPEAT: | 1051 | case TREE_NEXT | BUTTON_REPEAT: |
1046 | case BUTTON_VOL_DOWN: | 1052 | case BUTTON_RC_VOL_DOWN: |
1047 | if(filesindir) | 1053 | if(filesindir) |
1048 | { | 1054 | { |
1049 | if (dircursor + dirstart + 1 < numentries ) { | 1055 | if (dircursor + dirstart + 1 < numentries ) { |