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



Rockbox mail archive

Subject: settings.c confuses me

settings.c confuses me

From: TP Diffenbach <rockbox_at_diffenbach.org>
Date: Sat, 22 Mar 2003 16:56:17 -0500

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!
Received on 2003-03-22

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