From 23d9812273d9c74af72ccdc3aa4cfea971f220a4 Mon Sep 17 00:00:00 2001 From: Andrew Mahone Date: Fri, 16 Jan 2009 10:34:40 +0000 Subject: 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 --- apps/plugins/wormlet.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'apps/plugins/wormlet.c') diff --git a/apps/plugins/wormlet.c b/apps/plugins/wormlet.c index 42b93c2..abb2653 100644 --- a/apps/plugins/wormlet.c +++ b/apps/plugins/wormlet.c @@ -462,9 +462,6 @@ static int player3_dir = EAST; control a worm */ static int players = 1; -/* the rockbox plugin api */ -static const struct plugin_api* rb; - #define SETTINGS_VERSION 1 #define SETTINGS_MIN_VERSION 1 #define SETTINGS_FILENAME "wormlet.cfg" @@ -2468,7 +2465,7 @@ bool launch_wormlet(void) rb->lcd_clear_display(); /* Turn off backlight timeout */ - backlight_force_on(rb); /* backlight control in lib/helper.c */ + backlight_force_on(); /* backlight control in lib/helper.c */ /* start the game */ while (game_result == 1) @@ -2478,7 +2475,7 @@ bool launch_wormlet(void) { case 2: /* Turn on backlight timeout (revert to settings) */ - backlight_use_settings(rb); /* backlight control in lib/helper.c */ + backlight_use_settings(); /* backlight control in lib/helper.c */ return false; break; } @@ -2490,17 +2487,15 @@ bool launch_wormlet(void) /** * Main entry point */ -enum plugin_status plugin_start(const struct plugin_api* api, const void* parameter) +enum plugin_status plugin_start(const void* parameter) { int result; int menu_quit = 0; int new_setting; (void)(parameter); - rb = api; default_settings(); - configfile_init(rb); if (configfile_load(SETTINGS_FILENAME, config, sizeof(config)/sizeof(*config), SETTINGS_MIN_VERSION ) < 0) -- cgit v1.1