Rockbox.org home
Downloads
Release release
Dev builds dev builds
Extras extras
themes themes
Documentation
Manual manual
Wiki wiki
Device Status device status
Support
Forums forums
Mailing lists mailing lists
IRC IRC
Development
Bugs bugs
Patches patches
Dev Guide dev guide
Search



Donate

Rockbox Technical Forums


Login with username, password and session length
Home Help Search Staff List Login Register
News:

Rockbox Ports are now being developed for various digital audio players!

+  Rockbox Technical Forums
|-+  Rockbox Development
| |-+  Starting Development and Compiling
| | |-+  Rockbox bootscreen delay
« previous next »
  • Print
Pages: [1]

Author Topic: Rockbox bootscreen delay  (Read 2322 times)

Offline firebane

  • Member
  • *
  • Posts: 11
Rockbox bootscreen delay
« on: May 12, 2007, 01:30:23 PM »
So I got the boot screen changed but it goes by a bit fast (I know this is intended) but if I wanted to add a bit of delay before loading the OS how or where would I go about doing this? Just looking for some pointers.
« Last Edit: May 12, 2007, 11:45:54 PM by firebane »
Logged

Offline Mikerman

  • Artist
  • Member
  • *
  • Posts: 721
Re: Rockbox bootscreen
« Reply #1 on: May 12, 2007, 09:42:05 PM »
This had been posted previously in a thread:  how to add a delay to the boot/splashscreen, and how to have it pause until a button is pressed (I liked that one especially).

http://forums.rockbox.org/index.php?topic=6193.0

I tried the latter idea and couldn't get it to work for me.  Would be great to hear if/how these work for others.

For a pause of x seconds:

Quote
Yep, easy... Just add a sleep line in main.c in the function called app_main
so, change

Code:

void app_main(void)
{
    init();
    browse_root();
}

to

Code:

void app_main(void)
{
    init();
    sleep(HZ * x);
    browse_root();
}


where x is the no. of seconds delay you want.

For a wait:

Quote
Instead of the sleep() function you could try
Code:
get_action (CONTEXT_NONE,TIMEOUT_BLOCK);

This will wait for a button press before continuing to execute.

Logged

Offline firebane

  • Member
  • *
  • Posts: 11
Re: Rockbox bootscreen
« Reply #2 on: May 12, 2007, 10:22:54 PM »
heh i searched high and low.. thanks.

i'll try and report back

..

Ok so the sim doesn't recognize the sleep function and doesn't pause, but when you put it to the ipod it works fine!

Thanks.
« Last Edit: May 12, 2007, 10:56:25 PM by firebane »
Logged

Offline Mikerman

  • Artist
  • Member
  • *
  • Posts: 721
Re: Rockbox bootscreen
« Reply #3 on: May 12, 2007, 11:18:15 PM »
Did you try the pause-until-a-button-is-pressed method as well?  It wouldn't work for me earlier.
Logged

Offline firebane

  • Member
  • *
  • Posts: 11
Re: Rockbox bootscreen
« Reply #4 on: May 12, 2007, 11:43:48 PM »
Ok so there is two options you can add a sleep(); and toss a time in if you want or you can use the get_action function and use the play button to continue and todo the following:

This is all modified in rockbox/apps/main.c @ line 126

Sleep Function
Before
Code: [Select]
{
  init();
  browse_root();
}

After
Code: [Select]
{
  init();
  sleep(#); // # represents a number in seconds
  browse_root();
}

Button Press Code
Before
Code: [Select]
{
  init();
  browse_root();
}

After
Code: [Select]
{
  init();
  get_action(BUTTON_PLAY,-1);
  browse_root();
}
« Last Edit: May 12, 2007, 11:45:40 PM by firebane »
Logged

Offline Mikerman

  • Artist
  • Member
  • *
  • Posts: 721
Re: Rockbox bootscreen delay
« Reply #5 on: May 13, 2007, 10:36:56 AM »
Thanks, that's great--will check it out.

I think this is another nice security feature--put a "return me" notice on the opening splashscreen and add a time delay or stall, and it helps "remind" someone to return a found player.
Logged

Offline Mikerman

  • Artist
  • Member
  • *
  • Posts: 721
Re: Rockbox bootscreen delay
« Reply #6 on: May 15, 2007, 09:18:10 PM »
Thanks, firebane, just tried doing this with the play button pause option (see above), but when compiling, I get an error message,

Quote
main.c:125: error: 'BUTTON_PLAY' undeclared (first use in this function)

I thought I did what was noted above--any suggestion?  If it's of any assistance, this is on an iRiver H1xx player.

edit:

I also just tried the alternate method, by adding the line (where noted):

Quote
sleep(5);


(I assume that I wasn't supposed to add the 2 slash lines--but if I am wrong, please let me know.)

This pauses the bootscreen sometimes, but not consistently (and actually, less than 50% of the time from a cold start)--I can't discern a pattern there.

Thanks--
« Last Edit: May 15, 2007, 10:00:42 PM by Mikerman »
Logged

  • Print
Pages: [1]
« previous next »
+  Rockbox Technical Forums
|-+  Rockbox Development
| |-+  Starting Development and Compiling
| | |-+  Rockbox bootscreen delay
 

  • SMF 2.0.17 | SMF © 2019, Simple Machines
  • Rockbox Privacy Policy
  • XHTML
  • RSS
  • WAP2

Page created in 0.066 seconds with 15 queries.