Rockbox.org home
release
dev builds
extras
themes manual
wiki
device status forums
mailing lists
IRC bugs
patches
dev guide
translations



Rockbox mail archive

Subject: Re: remote control problem

Re: remote control problem

From: Ingo Korb <ml_at_akana.de>
Date: 17 May 2003 12:14:58 +0200

Ingo Korb <ml_at_akana.de> writes:

> In my case the volume up/down- and play-buttons work as expected, stop and
> forward/reverse only turn on the backlight.

Well, the nice thing about trying to post with the wrong address is that
nobody will see your mistakes and you can think about the problem some
more. =)

I think the "use remote while keys are locked"-patch that was checked in
2003-04-23 is completely broken. Although the stuff done by it lays a
few foundations for implementing that function (which is why I'd
recommend keeping it) it does not work as-is and breaks the remote
almost everywhere. The patch below is a quick-and-dirty-fix for the WPS.

I think it would be best to modify button_get so the returned keycodes
are always the same for both keypad and remote (as before) so one
doesn't have to change every single app and add a second funktion
"button_get_raw" (or similiar) that returns the unmasked button word for
those funktions that need to know the difference (like WPS for key
locking). If I can spare the time I'll try to implement it this weekend.

BTW, why is the lastbutton-variable in the STOP case only checked on
players?

Q&D-Fix for wps.c against the current CVS:
=== Cut ===
Index: wps.c
===================================================================
RCS file: /cvsroot/rockbox/apps/wps.c,v
retrieving revision 1.188
diff -u -r1.188 wps.c
--- wps.c 23 Apr 2003 11:26:23 -0000 1.188
+++ wps.c 17 May 2003 10:05:53 -0000
_at__at_ -921,10 +921,10 _at__at_
                 break;
 
                 /* prev / restart */
- case BUTTON_RC_LEFT:
+ case BUTTON_RC_LEFT | BUTTON_REL:
             case BUTTON_LEFT | BUTTON_REL:
 #ifdef HAVE_RECORDER_KEYPAD
- if ( lastbutton != BUTTON_LEFT )
+ if ( lastbutton != BUTTON_LEFT && lastbutton != BUTTON_RC_LEFT)
                      break;
 #endif
                 if (!id3 || (id3->elapsed < 3*1000)) {
_at__at_ -942,10 +942,10 _at__at_
                 break;
 
                 /* next */
- case BUTTON_RC_RIGHT:
+ case BUTTON_RC_RIGHT | BUTTON_REL:
             case BUTTON_RIGHT | BUTTON_REL:
 #ifdef HAVE_RECORDER_KEYPAD
- if ( lastbutton != BUTTON_RIGHT )
+ if ( lastbutton != BUTTON_RIGHT && lastbutton != BUTTON_RC_RIGHT)
                      break;
 #endif
                 mpeg_next();
_at__at_ -984,12 +984,12 _at__at_
 #endif
 
                 /* stop and exit wps */
+ case BUTTON_RC_STOP | BUTTON_REL:
 #ifdef HAVE_RECORDER_KEYPAD
             case BUTTON_OFF:
 #else
- case BUTTON_RC_STOP:
             case BUTTON_STOP | BUTTON_REL:
- if ( lastbutton != BUTTON_STOP )
+ if ( lastbutton != BUTTON_STOP && lastbutton != BUTTON_RC_STOP )
                     break;
 #endif
                 exit = true;
=== Cut ===

-ik
Received on 2003-05-17

Page template was last modified "Tue Sep 7 00:00:02 2021" The Rockbox Crew -- Privacy Policy