|
Rockbox mail archiveSubject: settings.c confuses meFrom: TP Diffenbach (rockbox_at_diffenbach.org) Date: 2003-03-22
settings.c creates a config_block of 512 byes, and has functions dor copying the config_block to the global_settings and vice versa. I know that some settings are saved, if it exists, to the RTC, and some to disk.
However, both global_settings and config_block are static, so we wind up with two copies of the settings, one in global_settings and one in the config_block. (But bools in global_settings are masked into bits in config_block.)
Why not just read the settings on disk into global settings: read( fd, &global_settings, sizeof( global_settings)?, with some additional code for the RTC? It seems this would save a lot of code, and at least 512 bytes of statically allocated memory.
Since it's not done this way, I must be missing something. What am I missing?
-- Archos FM needs a Rockbox!
Page was last modified "Jan 10 2012" The Rockbox Crew |