From a79027743ab00911a839a76420e7e26a741ceee3 Mon Sep 17 00:00:00 2001 From: Jens Arnold Date: Mon, 16 Jan 2006 23:20:58 +0000 Subject: Model & version check for simulator plugins. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8356 a1c6a512-1295-4272-9138-f99709370657 --- apps/plugin.h | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'apps/plugin.h') diff --git a/apps/plugin.h b/apps/plugin.h index bf8f34ab9e..69a2a79ba8 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 -- cgit v1.2.3