Rockbox mail archive
Subject: Re: UI and Menu structure rewrite for custom Rockbox - any pointers?
From: Christian Marg (christian.marg_at_tu-clausthal.de)
Date: 2004-10-08
Björn Stenberg wrote:
> The mp3 files are loaded by firmware/mpeg.c, specifically new_file().
> It currently works as you guessed: It will not let you skip back over
> a missing file. A patch is welcome.
Since I don't have a programming environment I didn't test this, but as
mpeg.c, line 1269 uses a "new_file(-1)" to load the
previous file, the patch would be quite easy:
-----8<-----8<-----8<-----8<-----8<-----
*** mpeg.bak.c Fri Oct 8 21:20:30 2004
--- mpeg.c Fri Oct 8 21:30:10 2004
***************
*** 855,865 ****
mpeg_file = open(trackname, O_RDONLY);
if(mpeg_file < 0) {
DEBUGF("Couldn't open file: %s\n",trackname);
! steps++;
! /* Bail out if no file could be opened */
! if(steps > max_steps)
! return -1;
}
else
{
--- 855,875 ----
mpeg_file = open(trackname, O_RDONLY);
if(mpeg_file < 0) {
DEBUGF("Couldn't open file: %s\n",trackname);
! if (steps > 0) {
! steps++;
! /* Bail out if no file could be opened */
! if(steps > max_steps)
! return -1;
! }
! else
! {
! steps--;
! /* Bail out if no file could be opened */
! if( (start+steps)<=0)
! return -1;
!
! }
}
else
{
-----8<-----8<-----8<-----8<-----8<-----
_______________________________________________
http://cool.haxx.se/mailman/listinfo/rockbox
Page was last modified "Mar 9 2008" The Rockbox Crew
|