Use enum themable_icons in struct file_type and struct filetype (who made those names?).

It's the correct type and should save some memory due to struct padding (on eabi).

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30027 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Thomas Martitz 2011-06-20 19:32:48 +00:00
parent 26ec41b028
commit 7b374b43b5
3 changed files with 4 additions and 5 deletions

View file

@ -159,7 +159,7 @@ void tree_get_filetypes(const struct filetype** types, int* count)
#define ROCK_EXTENSION "rock"
struct file_type {
int icon; /* the icon which shall be used for it, NOICON if unknown */
enum themable_icons icon; /* the icon which shall be used for it, NOICON if unknown */
unsigned char attr; /* FILE_ATTR_MASK >> 8 */
char* plugin; /* Which plugin to use, NULL if unknown, or builtin */
char* extension; /* NULL for none */

View file

@ -51,8 +51,8 @@
struct filetype {
char* extension;
int tree_attr;
int icon;
int voiceclip;
enum themable_icons icon;
};
void tree_get_filetypes(const struct filetype**, int*);

View file

@ -30,12 +30,11 @@ typedef const unsigned char * ICON;
typedef long ICON;
#endif
#define NOICON Icon_NOICON
#define FORCE_INBUILT_ICON 0x80000000
/* Don't #ifdef icon values, or we wont be able to use the same
bmp for every target. */
enum themable_icons {
Icon_NOICON = -1, /* Dont put this in a .bmp */
NOICON = -1,
Icon_NOICON = NOICON, /* Dont put this in a .bmp */
Icon_Audio,
Icon_Folder,
Icon_Playlist,