[Feature] Persist pitch settings through reboots

saves the pitch setting across reboots

adds option 'Reset Setting'

Change-Id: I75d88f9653883a256c6cca0f7adcdccb2dd51406
This commit is contained in:
William Wilgus 2025-01-17 03:01:53 -05:00 committed by William Wilgus
parent 5e8d3fec66
commit 13c3214d9c
7 changed files with 126 additions and 10 deletions

View file

@ -49,8 +49,15 @@ int configfile_save(const char *filename, const struct configdata *cfg,
int i;
char buf[MAX_PATH];
get_cfg_filename(buf, MAX_PATH, filename);
fd = rb->creat(buf, 0666);
if (rb->strncmp(filename, ROCKBOX_DIR, sizeof(ROCKBOX_DIR) - 1) != 0)
{
get_cfg_filename(buf, MAX_PATH, filename);
fd = rb->creat(buf, 0666);
}
else /* allow saving to the rockbox directory */
fd = rb->creat(filename, 0666);
if(fd < 0)
return fd*10 - 1;