Rockbox Technical Forums

Rockbox Development => Starting Development and Compiling => Topic started by: ace214 on September 04, 2007, 03:23:57 PM

Title: Change startup file folder
Post by: ace214 on September 04, 2007, 03:23:57 PM
Ok, so I would like to be able to change the startup file folder from the root to my MUSIC directory.

I found the start_in_screen variable in the settings list codepage and looked for like an hour trying to find where it specifies the folder.

Perhaps I should request this in the tracker, but I figured I could just do it myself once I knew where it was.

Hopefully, this is best the forum for this.
Title: Re: Change startup file folder
Post by: GodEater on September 04, 2007, 03:44:11 PM
start_in_screen specifies which screen to start in (e.g. radio, database, file browser) - not a folder.
Title: Re: Change startup file folder
Post by: ace214 on September 04, 2007, 10:59:49 PM
So can you change what folder the file browser starts in?
Title: Re: Change startup file folder
Post by: GodEater on September 05, 2007, 03:52:59 AM
I guess you could do - use the set_current_file() function to do this (it takes either a filename or a directory name as an argument).
Title: Re: Change startup file folder
Post by: ace214 on September 05, 2007, 09:24:19 AM
In which codepage?
Title: Re: Change startup file folder
Post by: GodEater on September 05, 2007, 09:32:01 AM
Eh? What's it got to do with which codepage you have ?
Title: Re: Change startup file folder
Post by: bascule on September 05, 2007, 10:17:14 AM
Errr... I think he means page of code i.e., which source file
Title: Re: Change startup file folder
Post by: ace214 on September 05, 2007, 10:57:37 AM
Errr... I think he means page of code i.e., which source file
Yes, sorry. That's what I mean.
Title: Re: Change startup file folder
Post by: GodEater on September 05, 2007, 11:05:05 AM
But I thought you said you'd already found where this setting was ?
Title: Re: Change startup file folder
Post by: ace214 on September 05, 2007, 11:12:09 AM
I found the start in screen setting, not the set_current_file() function.
Title: Re: Change startup file folder
Post by: GodEater on September 06, 2007, 04:00:52 AM
oh - set_current_file() is in tree.h IIRC.
Title: Re: Change startup file folder
Post by: ace214 on September 06, 2007, 10:40:53 PM
Ok, that's where the function is mentioned but that's not what I need. I'll request it in the tracker.
Title: Re: Change startup file folder
Post by: dionoea on September 07, 2007, 04:18:13 AM
This is what I have in my tree to change the file browser location on boot:

Code: [Select]
--- apps/root_menu.c (revision 14585)
+++ apps/root_menu.c (working copy)
@@ -85,7 +85,7 @@
     int filter = SHOW_SUPPORTED;
     char folder[MAX_PATH] = "/";
     /* stuff needed to remember position in file browser */
-    static char last_folder[MAX_PATH] = "/";
+    static char last_folder[MAX_PATH] = "/media/";
     /* and stuff for the database browser */
 #ifdef HAVE_TAGCACHE      
     static int last_db_dirlevel = 0, last_db_selection = 0;
Title: Re: Change startup file folder
Post by: ace214 on September 07, 2007, 11:27:22 AM
Thanks a lot. I will use that for the time being.

Requested a setting in the tracker. FS #7724 (http://www.rockbox.org/tracker/task/7724)