mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-13 18:17:39 -04:00
remove nvram and use the existing settings framework for it add a crc check to the user_settings data to see if we need to save the user setting file or if we can just save the status file (resume.cfg) move volume to the system_status struct so we don't write the whole settings file over volume changes allow user to still export volume with save sound settings allow the user to also export pitch and speed name the file .resume.cfg Rename all the SYSTEM_STATUS save file variables to TLAs to save space and discourage tinkering Cleanup DEBUG_AVAIL_SETTINGS output when saving user_settings it calls status_save as well this cause the resume file to be written twice. instead remove the callback for status_save when setting_save is called remove header text when saving .resume.cfg convert status_save() to status_save(bool force) add SYSTEM_STATUS_UPDATE_TICKS for ATA device set this to 5 minutes since we arlready wait for the disk to be up before saving we don't want to miss our window for all other every 15 minutes that way if the battery is too low by the time shutdown comes around you don't lose much progress Change-Id: I27214ffd6e5d5494ee5ca83b14f04a41ba426ad7
124 lines
4.5 KiB
C
124 lines
4.5 KiB
C
/***************************************************************************
|
|
* __________ __ ___.
|
|
* Open \______ \ ____ ____ | | _\_ |__ _______ ___
|
|
* Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
|
|
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
|
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
|
* \/ \/ \/ \/ \/
|
|
* $Id$
|
|
*
|
|
* Copyright (C) 2010 Thomas Martitz
|
|
*
|
|
* This program is free software; you can redistribute it and/or
|
|
* modify it under the terms of the GNU General Public License
|
|
* as published by the Free Software Foundation; either version 2
|
|
* of the License, or (at your option) any later version.
|
|
*
|
|
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
|
* KIND, either express or implied.
|
|
*
|
|
****************************************************************************/
|
|
|
|
#ifndef __PATHS_H__
|
|
#define __PATHS_H__
|
|
|
|
#include <stdbool.h>
|
|
#include "autoconf.h"
|
|
|
|
/* name of directory where configuration, fonts and other data
|
|
* files are stored */
|
|
#ifdef __PCTOOL__
|
|
#undef WPS_DIR
|
|
#else
|
|
|
|
/* ROCKBOX_DIR is now defined in autoconf.h for flexible build types */
|
|
#ifndef ROCKBOX_DIR
|
|
#error ROCKBOX_DIR not defined (should be in autoconf.h)
|
|
#endif
|
|
#define ROCKBOX_DIR_LEN (sizeof(ROCKBOX_DIR)-1)
|
|
#endif /* def __PCTOOL__ */
|
|
|
|
/* NOTE: target-specific hosted HOME_DIR resides in filesystem-app.c */
|
|
#if !defined(APPLICATION) || defined(SAMSUNG_YPR0) || defined(SAMSUNG_YPR1) || \
|
|
defined(DX50) || defined(DX90) || defined(SONY_NWZ_LINUX) || \
|
|
defined(HIBY_LINUX) || defined(FIIO_M3K_LINUX)
|
|
|
|
#define HOME_DIR "/"
|
|
|
|
/* make sure both are the same for native builds */
|
|
#undef ROCKBOX_LIBRARY_PATH
|
|
#define ROCKBOX_LIBRARY_PATH ROCKBOX_DIR
|
|
|
|
#define PLUGIN_DIR ROCKBOX_DIR "/rocks"
|
|
#define CODECS_DIR ROCKBOX_DIR "/codecs"
|
|
|
|
#define RB_ROOT_VOL_HIDDEN(v) (IF_MV_VOL(v) == 0)
|
|
#define RB_ROOT_CONTENTS_DIR "/" IF_MV("<0>")
|
|
#define REC_BASE_DIR HOME_DIR "Recordings"
|
|
#define PLAYLIST_CATALOG_DEFAULT_DIR HOME_DIR "Playlists"
|
|
|
|
#else /* APPLICATION */
|
|
|
|
#define HOME_DIR "<HOME>" /* replaced at runtime */
|
|
#define HAVE_SPECIAL_DIRS
|
|
|
|
#define PLUGIN_DIR ROCKBOX_LIBRARY_PATH "/rockbox/rocks"
|
|
#if (CONFIG_PLATFORM & PLATFORM_ANDROID)
|
|
#define CODECS_DIR ROCKBOX_BINARY_PATH
|
|
#else
|
|
#define CODECS_DIR ROCKBOX_LIBRARY_PATH "/rockbox/codecs"
|
|
#endif
|
|
|
|
#define REC_BASE_DIR HOME_DIR "/Recordings"
|
|
#define PLAYLIST_CATALOG_DEFAULT_DIR HOME_DIR "/Playlists"
|
|
#endif /* !APPLICATION || SAMSUNG_YPR0 */
|
|
|
|
#define LANG_DIR ROCKBOX_DIR "/langs"
|
|
#define PLUGIN_GAMES_DIR PLUGIN_DIR "/games"
|
|
#define PLUGIN_APPS_DIR PLUGIN_DIR "/apps"
|
|
#define PLUGIN_DEMOS_DIR PLUGIN_DIR "/demos"
|
|
#define VIEWERS_DIR PLUGIN_DIR "/viewers"
|
|
|
|
#if defined(APPLICATION) && \
|
|
!(defined(SAMSUNG_YPR0) || defined(SAMSUNG_YPR1) || \
|
|
defined(DX50) || defined(DX90) || defined(SONY_NWZ_LINUX) || defined(HIBY_LINUX) || defined(FIIO_M3K_LINUX))
|
|
|
|
#define PLUGIN_DATA_DIR ROCKBOX_DIR "/rocks.data"
|
|
#define PLUGIN_GAMES_DATA_DIR PLUGIN_DATA_DIR
|
|
#define PLUGIN_APPS_DATA_DIR PLUGIN_DATA_DIR
|
|
#define PLUGIN_DEMOS_DATA_DIR PLUGIN_DATA_DIR
|
|
#define VIEWERS_DATA_DIR PLUGIN_DATA_DIR
|
|
#else
|
|
#define PLUGIN_DATA_DIR PLUGIN_DIR
|
|
#define PLUGIN_GAMES_DATA_DIR PLUGIN_DIR "/games"
|
|
#define PLUGIN_APPS_DATA_DIR PLUGIN_DIR "/apps"
|
|
#define PLUGIN_DEMOS_DATA_DIR PLUGIN_DIR "/demos"
|
|
#define VIEWERS_DATA_DIR PLUGIN_DIR "/viewers"
|
|
#endif
|
|
|
|
#define WPS_DIR ROCKBOX_DIR "/wps"
|
|
#define SBS_DIR WPS_DIR
|
|
#define THEME_DIR ROCKBOX_DIR "/themes"
|
|
#define FONT_DIR ROCKBOX_DIR "/fonts"
|
|
#define ICON_DIR ROCKBOX_DIR "/icons"
|
|
|
|
#define BACKDROP_DIR ROCKBOX_DIR "/backdrops"
|
|
#define EQS_DIR ROCKBOX_DIR "/eqs"
|
|
|
|
/* need to fix this once the application gets record/radio abilities */
|
|
#define RECPRESETS_DIR ROCKBOX_DIR "/recpresets"
|
|
#define FMPRESET_PATH ROCKBOX_DIR "/fmpresets"
|
|
|
|
#define DIRCACHE_FILE ROCKBOX_DIR "/dircache.dat"
|
|
#define CODEPAGE_DIR ROCKBOX_DIR "/codepages"
|
|
|
|
#define VIEWERS_CONFIG ROCKBOX_DIR "/viewers.config"
|
|
|
|
#define RESUMEFILE ROCKBOX_DIR "/.resume.cfg"
|
|
#define CONFIGFILE ROCKBOX_DIR "/config.cfg"
|
|
#define FIXEDSETTINGSFILE ROCKBOX_DIR "/fixed.cfg"
|
|
|
|
#define PLAYLIST_CONTROL_FILE ROCKBOX_DIR "/.playlist_control"
|
|
#define GLYPH_CACHE_FILE ROCKBOX_DIR "/.glyphcache"
|
|
|
|
#endif /* __PATHS_H__ */
|