From a6142ab7ab58f69a3f1a034db4bdf1eff24d3dd6 Mon Sep 17 00:00:00 2001 From: Linus Nielsen Feltzing Date: Thu, 10 Jun 2004 13:29:52 +0000 Subject: 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 --- apps/plugin.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'apps/plugin.c') diff --git a/apps/plugin.c b/apps/plugin.c index c7758afbcf..8d8d25fc99 100644 --- a/apps/plugin.c +++ b/apps/plugin.c @@ -21,6 +21,7 @@ #include #include #include +#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 #ifdef WIN32 #include "plugin-win32.h" - #define PREFIX(_x_) _x_ #else #include - #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); -- cgit v1.2.3