diff options
author | Andrew Mahone <andrew.mahone@gmail.com> | 2009-01-16 10:34:40 +0000 |
---|---|---|
committer | Andrew Mahone <andrew.mahone@gmail.com> | 2009-01-16 10:34:40 +0000 |
commit | 23d9812273d9c74af72ccdc3aa4cfea971f220a4 (patch) | |
tree | 8e60c3a2a41879f8b2a52516fa416b3ab906e239 /apps/plugins/wormlet.c | |
parent | 35677cbc54bbe400ebbff59b489dda7ca7f04916 (diff) |
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
Diffstat (limited to 'apps/plugins/wormlet.c')
-rw-r--r-- | apps/plugins/wormlet.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/apps/plugins/wormlet.c b/apps/plugins/wormlet.c index 42b93c2f2e..abb2653501 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) |