summaryrefslogtreecommitdiff
path: root/apps/plugin.c
diff options
context:
space:
mode:
authorLinus Nielsen Feltzing <linus@haxx.se>2004-06-10 13:29:52 +0000
committerLinus Nielsen Feltzing <linus@haxx.se>2004-06-10 13:29:52 +0000
commita6142ab7ab58f69a3f1a034db4bdf1eff24d3dd6 (patch)
treeef00c3ec8074ccb080b221c7d1dd4b3d03c8fd87 /apps/plugin.c
parent5fc1b64ae051e454d2b3bf3a20be5d88937e55e7 (diff)
downloadrockbox-a6142ab7ab58f69a3f1a034db4bdf1eff24d3dd6.tar.gz
rockbox-a6142ab7ab58f69a3f1a034db4bdf1eff24d3dd6.zip
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.c16
1 files changed, 10 insertions, 6 deletions
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 @@
21#include <stdio.h> 21#include <stdio.h>
22#include <atoi.h> 22#include <atoi.h>
23#include <timefuncs.h> 23#include <timefuncs.h>
24#include "debug.h"
24#include "button.h" 25#include "button.h"
25#include "lcd.h" 26#include "lcd.h"
26#include "dir.h" 27#include "dir.h"
@@ -39,6 +40,7 @@
39#include "backlight.h" 40#include "backlight.h"
40#include "ata.h" 41#include "ata.h"
41#include "talk.h" 42#include "talk.h"
43#include "mp3data.h"
42 44
43#ifdef HAVE_LCD_BITMAP 45#ifdef HAVE_LCD_BITMAP
44#include "widgets.h" 46#include "widgets.h"
@@ -48,11 +50,10 @@
48 #include <debug.h> 50 #include <debug.h>
49 #ifdef WIN32 51 #ifdef WIN32
50 #include "plugin-win32.h" 52 #include "plugin-win32.h"
51 #define PREFIX(_x_) _x_
52 #else 53 #else
53 #include <dlfcn.h> 54 #include <dlfcn.h>
54 #define PREFIX(_x_) x11_ ## _x_
55 #endif 55 #endif
56 #define PREFIX(_x_) sim_ ## _x_
56#else 57#else
57#define PREFIX(_x_) _x_ 58#define PREFIX(_x_) _x_
58#endif 59#endif
@@ -213,6 +214,12 @@ static struct plugin_api rockbox_api = {
213#ifdef HAVE_LCD_BITMAP 214#ifdef HAVE_LCD_BITMAP
214 font_get, 215 font_get,
215#endif 216#endif
217#if defined(DEBUG) || defined(SIMULATOR)
218 debugf,
219#endif
220 mp3info,
221 count_mp3_frames,
222 create_xing_header,
216}; 223};
217 224
218int plugin_load(char* plugin, void* parameter) 225int plugin_load(char* plugin, void* parameter)
@@ -246,11 +253,8 @@ int plugin_load(char* plugin, void* parameter)
246 lcd_clear_display(); 253 lcd_clear_display();
247#endif 254#endif
248#ifdef SIMULATOR 255#ifdef SIMULATOR
249#ifdef WIN32
250 snprintf(path, sizeof path, "%s", plugin);
251#else
252 snprintf(path, sizeof path, "archos%s", plugin); 256 snprintf(path, sizeof path, "archos%s", plugin);
253#endif 257
254 pd = dlopen(path, RTLD_NOW); 258 pd = dlopen(path, RTLD_NOW);
255 if (!pd) { 259 if (!pd) {
256 snprintf(buf, sizeof buf, "Can't open %s", plugin); 260 snprintf(buf, sizeof buf, "Can't open %s", plugin);