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: Pitch screen UI

Re: Pitch screen UI

From: David Johnston <david_at_pinkandaint.com>
Date: Sat, 20 Jun 2009 14:48:46 -0700

Okay, after a little exploring I haven't found any further answers, so let
me rephrase my question.

How can I modify an entry in global_settings and have that be persistent --
that is, that it'll be the same when I reboot?

I've found other places in the code where the same problem occurs as the one
I'm having. For instance, on the recording screen (not the recording menu)
if you change the AGC setting and then reboot, the setting will remain at
its previous value. But if you change the AGC setting on the record screen,
then change an unrelated setting via the menu, the AGC setting _will_ be
saved on shutdown.

Here's the code that decrements the AGC setting in the record screen:

---
                   case ITEM_AGC_MODE:
                        agc_preset = MAX(agc_preset - 1, 0);
                       agc_enable = (agc_preset != 0);
#ifdef HAVE_MIC_REC
                       if (global_settings.rec_source == AUDIO_SRC_MIC) {
                            global_settings.rec_agc_preset_mic = agc_preset;
                           agc_maxgain =
global_settings.rec_agc_maxgain_mic;
                        } else
#endif /* MIC */
                        {
                           global_settings.rec_agc_preset_line = agc_preset;
                            agc_maxgain =
global_settings.rec_agc_maxgain_line;
                       }
---
Somehow the menu system lets Rockbox know that settings have changed, but
just changing a value in global_settings doesn't.
Received on 2009-06-20

Page was last modified "Jan 10 2012" The Rockbox Crew
aaa