forked from len0rd/rockbox
loader-initialized global plugin API:
struct plugin_api *rb is declared in PLUGIN_HEADER, and pointed to by __header.api the loader uses this pointer to initialize rb before calling entry_point entry_point is no longer passed a pointer to the plugin API all plugins, and pluginlib functions, are modified to refer to the global rb pluginlib functions which only served to copy the API pointer are removed git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19776 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
35677cbc54
commit
23d9812273
179 changed files with 586 additions and 1183 deletions
|
@ -28,7 +28,6 @@
|
|||
#endif
|
||||
#define MAX_LINE_LEN 2048
|
||||
PLUGIN_HEADER
|
||||
static const struct plugin_api* rb;
|
||||
|
||||
static char buffer[MAX_CHARS];
|
||||
static char eol[3];
|
||||
|
@ -264,7 +263,7 @@ int do_item_menu(int cur_sel, char* copy_buffer)
|
|||
ret = MENU_RET_SAVE;
|
||||
break;
|
||||
case 6: /* playback menu */
|
||||
playback_control(rb, NULL);
|
||||
playback_control(NULL);
|
||||
ret = MENU_RET_UPDATE;
|
||||
break;
|
||||
default:
|
||||
|
@ -308,7 +307,7 @@ int hex_to_rgb(const char* hex, int* color)
|
|||
#endif /* HAVE_LCD_COLOR */
|
||||
|
||||
/* this is the plugin entry point */
|
||||
enum plugin_status plugin_start(const struct plugin_api* api, const void* parameter)
|
||||
enum plugin_status plugin_start(const void* parameter)
|
||||
{
|
||||
int fd;
|
||||
static char temp_line[MAX_LINE_LEN];
|
||||
|
@ -324,8 +323,6 @@ enum plugin_status plugin_start(const struct plugin_api* api, const void* parame
|
|||
bool edit_colors_file = false;
|
||||
#endif
|
||||
|
||||
rb = api;
|
||||
|
||||
copy_buffer[0]='\0';
|
||||
prev_show_statusbar = rb->global_settings->statusbar;
|
||||
rb->global_settings->statusbar = false;
|
||||
|
@ -481,7 +478,7 @@ enum plugin_status plugin_start(const struct plugin_api* api, const void* parame
|
|||
case 0:
|
||||
break;
|
||||
case 1:
|
||||
playback_control(rb, NULL);
|
||||
playback_control(NULL);
|
||||
break;
|
||||
case 2: //save to disk
|
||||
save_changes(1);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue