Rockbox Development > Starting Development and Compiling
Rockbox bootscreen delay
firebane:
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.
Mikerman:
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.
--- End quote ---
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.
--- End quote ---
firebane:
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.
Mikerman:
Did you try the pause-until-a-button-is-pressed method as well? It wouldn't work for me earlier.
firebane:
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: ---{
init();
browse_root();
}
--- End code ---
After
--- Code: ---{
init();
sleep(#); // # represents a number in seconds
browse_root();
}
--- End code ---
Button Press Code
Before
--- Code: ---{
init();
browse_root();
}
--- End code ---
After
--- Code: ---{
init();
get_action(BUTTON_PLAY,-1);
browse_root();
}
--- End code ---
Navigation
[0] Message Index
[#] Next page
Go to full version