Rockbox.org home
release
dev builds
extras
themes manual
wiki
device status forums
mailing lists
IRC bugs
patches
dev guide



Rockbox mail archive

Subject: Re: Settings primer.

Re: Settings primer.

From: Manuel Dejonghe <manuel_at_dejonghe.de>
Date: Wed, 15 Feb 2006 19:35:20 +0100

On 2/15/06, bk <mutualaid_at_gmail.com> wrote:
> On Wed, 2006-02-15 at 16:11 +0000, gl wrote:
> > Can somebody give me a rundown on the best way to add new settings?
> >
> > Specifically:
> >
> > - where should I add them in the various structs - eg. is it important to
> > add them at the end for persistence compatibility?
>
> Look in apps/settings.h. It contains a giant struct containing all the
> global config values. Note that order is significant.

There is a config-block-version-counter somewhere as well that only
needs to be updated if the order is changed.
If you add some settings, you don't break compatibility, so don't touch it.

> > - where are they persisted (hd sector? config file?) and which type of
> > settings should end up where?
>
> There is a raw HDD config block where the config struct is dumped. It
> must be read back in the same order it was written.

If I remember correctly, on archos devices, the config block is stored
in the rtc.

> (disclaimer: I'm a noob when it comes to the rockbox source)

/me too

lImbus
Received on 2006-02-15

Page template was last modified "Tue Sep 7 00:00:02 2021" The Rockbox Crew -- Privacy Policy