diff options
| author | Linus Nielsen Feltzing <linus@haxx.se> | 2004-06-10 13:29:52 +0000 |
|---|---|---|
| committer | Linus Nielsen Feltzing <linus@haxx.se> | 2004-06-10 13:29:52 +0000 |
| commit | a6142ab7ab58f69a3f1a034db4bdf1eff24d3dd6 (patch) | |
| tree | ef00c3ec8074ccb080b221c7d1dd4b3d03c8fd87 /apps/plugin.c | |
| parent | 5fc1b64ae051e454d2b3bf3a20be5d88937e55e7 (diff) | |
| download | rockbox-a6142ab7ab58f69a3f1a034db4bdf1eff24d3dd6.zip rockbox-a6142ab7ab58f69a3f1a034db4bdf1eff24d3dd6.tar.gz rockbox-a6142ab7ab58f69a3f1a034db4bdf1eff24d3dd6.tar.bz2 rockbox-a6142ab7ab58f69a3f1a034db4bdf1eff24d3dd6.tar.xz | |
Finally, the archos directory sandbox works in the same way for both X11 and win32 simulators. Unfortunately, this breaks the VC++ compatibility. Also, the plugin API now supports DEBUGF. Last, but not least, we have a new plugin, vbrfix.rock.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4726 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugin.c')
| -rw-r--r-- | apps/plugin.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/apps/plugin.c b/apps/plugin.c index c7758af..8d8d25f 100644 --- a/apps/plugin.c +++ b/apps/plugin.c @@ -21,6 +21,7 @@ #include <stdio.h> #include <atoi.h> #include <timefuncs.h> +#include "debug.h" #include "button.h" #include "lcd.h" #include "dir.h" @@ -39,6 +40,7 @@ #include "backlight.h" #include "ata.h" #include "talk.h" +#include "mp3data.h" #ifdef HAVE_LCD_BITMAP #include "widgets.h" @@ -48,11 +50,10 @@ #include <debug.h> #ifdef WIN32 #include "plugin-win32.h" - #define PREFIX(_x_) _x_ #else #include <dlfcn.h> - #define PREFIX(_x_) x11_ ## _x_ #endif + #define PREFIX(_x_) sim_ ## _x_ #else #define PREFIX(_x_) _x_ #endif @@ -213,6 +214,12 @@ static struct plugin_api rockbox_api = { #ifdef HAVE_LCD_BITMAP font_get, #endif +#if defined(DEBUG) || defined(SIMULATOR) + debugf, +#endif + mp3info, + count_mp3_frames, + create_xing_header, }; int plugin_load(char* plugin, void* parameter) @@ -246,11 +253,8 @@ int plugin_load(char* plugin, void* parameter) lcd_clear_display(); #endif #ifdef SIMULATOR -#ifdef WIN32 - snprintf(path, sizeof path, "%s", plugin); -#else snprintf(path, sizeof path, "archos%s", plugin); -#endif + pd = dlopen(path, RTLD_NOW); if (!pd) { snprintf(buf, sizeof buf, "Can't open %s", plugin); |