summaryrefslogtreecommitdiff
path: root/apps/plugin.h
diff options
context:
space:
mode:
authorJens Arnold <amiconn@rockbox.org>2006-01-16 23:20:58 +0000
committerJens Arnold <amiconn@rockbox.org>2006-01-16 23:20:58 +0000
commita79027743ab00911a839a76420e7e26a741ceee3 (patch)
tree7c60fd12ef0405dfff7ff7af46379ef40d6d0f74 /apps/plugin.h
parent137501b9ac11032f57c63b4f90ec9379bf134b08 (diff)
downloadrockbox-a79027743ab00911a839a76420e7e26a741ceee3.zip
rockbox-a79027743ab00911a839a76420e7e26a741ceee3.tar.gz
rockbox-a79027743ab00911a839a76420e7e26a741ceee3.tar.bz2
rockbox-a79027743ab00911a839a76420e7e26a741ceee3.tar.xz
Model & version check for simulator plugins.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8356 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugin.h')
-rw-r--r--apps/plugin.h12
1 files changed, 7 insertions, 5 deletions
diff --git a/apps/plugin.h b/apps/plugin.h
index bf8f34a..69a2a79 100644
--- a/apps/plugin.h
+++ b/apps/plugin.h
@@ -427,7 +427,6 @@ struct plugin_api {
};
-#ifndef SIMULATOR
/* plugin header */
struct plugin_header {
unsigned long magic;
@@ -438,6 +437,7 @@ struct plugin_header {
enum plugin_status(*entry_point)(struct plugin_api*, void*);
};
#ifdef PLUGIN
+#ifndef SIMULATOR
extern unsigned char plugin_start_addr[];
extern unsigned char plugin_end_addr[];
#define PLUGIN_HEADER \
@@ -445,9 +445,12 @@ extern unsigned char plugin_end_addr[];
__attribute__ ((section (".header")))= { \
PLUGIN_MAGIC, TARGET_ID, PLUGIN_API_VERSION, \
plugin_start_addr, plugin_end_addr, plugin_start };
-#endif
#else /* SIMULATOR */
-#define PLUGIN_HEADER
+#define PLUGIN_HEADER \
+ const struct plugin_header __header = { \
+ PLUGIN_MAGIC, TARGET_ID, PLUGIN_API_VERSION, \
+ NULL, NULL, plugin_start };
+#endif
#endif
int plugin_load(const char* plugin, void* parameter);
@@ -456,7 +459,6 @@ void* plugin_get_audio_buffer(int *buffer_size);
void plugin_tsr(void (*exit_callback)(void));
/* defined by the plugin */
-enum plugin_status plugin_start(struct plugin_api* rockbox, void* parameter)
- __attribute__ ((section (".entry")));
+enum plugin_status plugin_start(struct plugin_api* rockbox, void* parameter);
#endif