diff options
Diffstat (limited to 'apps')
| -rw-r--r-- | apps/plugin.c | 4 | ||||
| -rw-r--r-- | apps/plugin.h | 12 |
2 files changed, 16 insertions, 0 deletions
diff --git a/apps/plugin.c b/apps/plugin.c index 90b64ef..a44482d 100644 --- a/apps/plugin.c +++ b/apps/plugin.c @@ -327,6 +327,10 @@ static const struct plugin_api rockbox_api = { /* new stuff at the end, sort into place next time the API gets incompatible */ +#ifdef ROCKBOX_HAS_LOGF + logf, +#endif + }; #if CONFIG_HWCODEC == MASNONE diff --git a/apps/plugin.h b/apps/plugin.h index 3990ffe..dbfdca5 100644 --- a/apps/plugin.h +++ b/apps/plugin.h @@ -60,6 +60,7 @@ #endif #ifdef PLUGIN + #if defined(DEBUG) || defined(SIMULATOR) #undef DEBUGF #define DEBUGF rb->debugf @@ -69,6 +70,14 @@ #define DEBUGF(...) #define LDEBUGF(...) #endif + +#ifdef ROCKBOX_HAS_LOGF +#undef LOGF +#define LOGF rb->logf +#else +#define LOGF(...) +#endif + #endif #ifdef SIMULATOR @@ -381,6 +390,9 @@ struct plugin_api { /* new stuff at the end, sort into place next time the API gets incompatible */ +#ifdef ROCKBOX_HAS_LOGF + void (*logf)(const char *fmt, ...); +#endif }; /* defined by the plugin loader (plugin.c) */ |