FS#2400 - bookmark_autoload() button handling needs improvements.

Attached to Project: Rockbox
Opened by Magnus Holmgren (learman) - Sunday, 21 November 2004, 20:29 GMT
Last edited by Jens Arnold (amiconn) - Tuesday, 17 May 2005, 23:34 GMT
Task Type Bugs
Category User Interface
Status Closed
Assigned To No-one
Operating System
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No


When using the "Ask" setting for "Load Last Bookmark",
and I want to load the last bookmark, Rockbox often
gets it wrong. If I'm too quick, the response press is
ingored, and if I wait a little, the press can be
treated as a yes or as a no. At first this behaviour
seemed random, but after looking at the code I
understand what's going on:

Upon entering bookmark_autoload, the following (among
others) happen:
1. Clear button queue.
2. Wait a second.
3. Clear button queue again.
4. Wait for button event.

If I wait a little, the button press can be before step
3 and the release affter step 3. The way the loop is
written, this button release is interpreted as a no.
This, in combination with the 1 second delay, makes
this screen pretty annoying... :)

I haven't had the time to look closely at this, but it
seems to me this screen should be handled like in the
settings menu screens (where the same button can be
used both to enter and leave a screen), where a stray
button release (or repeat) event won't be interpreted
as a no, simply by only exiting the screens on explicit
button presses (in this case, there should probably be
several "no" buttons). Then there'd be no need for an
annoying delay either, IMHO.

I've seen this on a player, but it applies to recorders
as well.
This task depends upon

Closed by  Jens Arnold (amiconn)
Tuesday, 17 May 2005, 22:12 GMT
Reason for closing:  Fixed
Comment by Jens Arnold (amiconn) - Tuesday, 17 May 2005, 23:34 GMT

I meant to set it to 'fixed'...