From 55a63609ef1bf24c3594eeb2f6eca92cba81bae5 Mon Sep 17 00:00:00 2001 From: Teruaki Kawashima Date: Thu, 30 Sep 2010 13:09:50 +0000 Subject: use correct condition for #if for tagcache_fill_tags(). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28188 a1c6a512-1295-4272-9138-f99709370657 --- apps/gui/skin_engine/skin_tokens.c | 2 +- apps/plugin.c | 2 +- apps/plugin.h | 2 +- apps/plugins/pictureflow/pictureflow.c | 2 +- apps/tagcache.h | 2 ++ 5 files changed, 6 insertions(+), 4 deletions(-) diff --git a/apps/gui/skin_engine/skin_tokens.c b/apps/gui/skin_engine/skin_tokens.c index 19a5ba5979..11200e448c 100644 --- a/apps/gui/skin_engine/skin_tokens.c +++ b/apps/gui/skin_engine/skin_tokens.c @@ -537,7 +537,7 @@ static struct mp3entry* get_mp3entry_from_offset(int offset, char **filename) fname = playlist_peek(offset, filename_buf, sizeof(filename_buf)); *filename = (char*)fname; #if CONFIG_CODEC == SWCODEC -#ifdef HAVE_TC_RAMCACHE +#if defined(HAVE_TC_RAMCACHE) && defined(HAVE_DIRCACHE) static struct mp3entry tempid3; if (tagcache_fill_tags(&tempid3, fname)) { diff --git a/apps/plugin.c b/apps/plugin.c index 193d02e034..28c5854798 100644 --- a/apps/plugin.c +++ b/apps/plugin.c @@ -703,7 +703,7 @@ static const struct plugin_api rockbox_api = { tagcache_retrieve, tagcache_search_finish, tagcache_get_numeric, -#ifdef HAVE_TC_RAMCACHE +#if defined(HAVE_TC_RAMCACHE) && defined(HAVE_DIRCACHE) tagcache_fill_tags, #endif #endif diff --git a/apps/plugin.h b/apps/plugin.h index 0b3a5b566f..cbfc48bd08 100644 --- a/apps/plugin.h +++ b/apps/plugin.h @@ -874,7 +874,7 @@ struct plugin_api { int tag, char *buf, long size); void (*tagcache_search_finish)(struct tagcache_search *tcs); long (*tagcache_get_numeric)(const struct tagcache_search *tcs, int tag); -#ifdef HAVE_TC_RAMCACHE +#if defined(HAVE_TC_RAMCACHE) && defined(HAVE_DIRCACHE) bool (*tagcache_fill_tags)(struct mp3entry *id3, const char *filename); #endif #endif diff --git a/apps/plugins/pictureflow/pictureflow.c b/apps/plugins/pictureflow/pictureflow.c index 8ad62b0238..7627ff4a53 100644 --- a/apps/plugins/pictureflow/pictureflow.c +++ b/apps/plugins/pictureflow/pictureflow.c @@ -948,7 +948,7 @@ bool get_albumart_for_index_from_db(const int slide_index, char *buf, struct mp3entry id3; int fd; -#ifdef HAVE_TC_RAMCACHE +#if defined(HAVE_TC_RAMCACHE) && defined(HAVE_DIRCACHE) if (rb->tagcache_fill_tags(&id3, tcs.result)) { rb->strlcpy(id3.path, tcs.result, sizeof(id3.path)); diff --git a/apps/tagcache.h b/apps/tagcache.h index 15b4251ddc..b52da76a0f 100644 --- a/apps/tagcache.h +++ b/apps/tagcache.h @@ -239,7 +239,9 @@ void tagcache_screensync_enable(bool state); #ifdef HAVE_TC_RAMCACHE bool tagcache_is_ramcache(void); +#ifdef HAVE_DIRCACHE bool tagcache_fill_tags(struct mp3entry *id3, const char *filename); +#endif void tagcache_unload_ramcache(void); #endif void tagcache_init(void) INIT_ATTR; -- cgit v1.2.3