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/xobox.c | |
| parent | 35677cbc54bbe400ebbff59b489dda7ca7f04916 (diff) | |
| download | rockbox-23d9812273d9c74af72ccdc3aa4cfea971f220a4.zip rockbox-23d9812273d9c74af72ccdc3aa4cfea971f220a4.tar.gz rockbox-23d9812273d9c74af72ccdc3aa4cfea971f220a4.tar.bz2 rockbox-23d9812273d9c74af72ccdc3aa4cfea971f220a4.tar.xz | |
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/xobox.c')
| -rw-r--r-- | apps/plugins/xobox.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/apps/plugins/xobox.c b/apps/plugins/xobox.c index 3cf6663..260728c 100644 --- a/apps/plugins/xobox.c +++ b/apps/plugins/xobox.c @@ -297,9 +297,7 @@ static int speed = 6; /* CYCLETIME = (11-speed)*10 ms */ static int difficulty = 75; /* Percentage of screen that needs to be filled * in order to win the game */ -static const struct plugin_api *rb; - -MEM_FUNCTION_WRAPPERS(rb); +MEM_FUNCTION_WRAPPERS; static bool quit = false; @@ -1014,12 +1012,11 @@ static int xobox_loop (void) } /* plugin main procedure */ -enum plugin_status plugin_start (const struct plugin_api *api, const void *parameter) +enum plugin_status plugin_start (const void *parameter) { int ret = PLUGIN_OK; (void) parameter; - rb = api; rb->lcd_setfont (FONT_SYSFIXED); #if LCD_DEPTH>=2 @@ -1027,7 +1024,7 @@ enum plugin_status plugin_start (const struct plugin_api *api, const void *param #endif /* Turn off backlight timeout */ - backlight_force_on(rb); /* backlight control in lib/helper.c */ + backlight_force_on(); /* backlight control in lib/helper.c */ quit = false; @@ -1038,7 +1035,7 @@ enum plugin_status plugin_start (const struct plugin_api *api, const void *param } /* 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 */ rb->lcd_setfont (FONT_UI); return ret; |