diff options
author | Thomas Martitz <kugel@rockbox.org> | 2009-08-07 00:56:39 +0000 |
---|---|---|
committer | Thomas Martitz <kugel@rockbox.org> | 2009-08-07 00:56:39 +0000 |
commit | 40b09205fc0ea2d4e6514ec4b907532328563069 (patch) | |
tree | 78d49abf3ad5854c0ec7049f0d402acb55946768 /apps/settings.h | |
parent | c80f6dad303da248d7fe7d1acbe5916a06e3f73d (diff) |
Change a few defines to enums to match the other code around and argument bits #defines for settings_load to make clear it's bitwise.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22192 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/settings.h')
-rw-r--r-- | apps/settings.h | 38 |
1 files changed, 22 insertions, 16 deletions
diff --git a/apps/settings.h b/apps/settings.h index 3d05e29c64..ad6f225bad 100644 --- a/apps/settings.h +++ b/apps/settings.h @@ -83,12 +83,14 @@ struct opt_items { #define MAX_FILENAME 32 -#define BOOKMARK_NO 0 -#define BOOKMARK_YES 1 -#define BOOKMARK_ASK 2 -#define BOOKMARK_UNIQUE_ONLY 2 -#define BOOKMARK_RECENT_ONLY_YES 3 -#define BOOKMARK_RECENT_ONLY_ASK 4 +enum { + BOOKMARK_NO, + BOOKMARK_YES, + BOOKMARK_ASK, + BOOKMARK_UNIQUE_ONLY, + BOOKMARK_RECENT_ONLY_YES, + BOOKMARK_RECENT_ONLY_ASK, +}; enum { @@ -104,14 +106,18 @@ enum TRIG_TYPE_NEW_FILE }; -#define CROSSFADE_ENABLE_SHUFFLE 1 -#define CROSSFADE_ENABLE_TRACKSKIP 2 -#define CROSSFADE_ENABLE_SHUFFLE_AND_TRACKSKIP 3 -#define CROSSFADE_ENABLE_ALWAYS 4 +enum { + CROSSFADE_ENABLE_SHUFFLE, + CROSSFADE_ENABLE_TRACKSKIP, + CROSSFADE_ENABLE_SHUFFLE_AND_TRACKSKIP, + CROSSFADE_ENABLE_ALWAYS, +}; -#define FOLDER_ADVANCE_OFF 0 -#define FOLDER_ADVANCE_NEXT 1 -#define FOLDER_ADVANCE_RANDOM 2 +enum { + FOLDER_ADVANCE_OFF, + FOLDER_ADVANCE_NEXT, + FOLDER_ADVANCE_RANDOM, +} /* repeat mode options */ enum @@ -210,9 +216,9 @@ enum { ALARM_START_WPS = 0, /** function prototypes **/ /* argument bits for settings_load() */ -#define SETTINGS_RTC 1 /* only the settings from the RTC nonvolatile RAM */ -#define SETTINGS_HD 2 /* only the settings from the disk sector */ -#define SETTINGS_ALL 3 /* both */ +#define SETTINGS_RTC (BIT_N(0)) /* only the settings from the RTC nonvolatile RAM */ +#define SETTINGS_HD (BIT_N(1)) /* only the settings from the disk sector */ +#define SETTINGS_ALL (SETTINGS_RTC|SETTINGS_HD) /* both */ void settings_load(int which); bool settings_load_config(const char* file, bool apply); |