summaryrefslogtreecommitdiffstats
path: root/apps/plugins/greyscale.c
diff options
context:
space:
mode:
authorAndrew Mahone <andrew.mahone@gmail.com>2009-01-16 10:34:40 +0000
committerAndrew Mahone <andrew.mahone@gmail.com>2009-01-16 10:34:40 +0000
commit23d9812273d9c74af72ccdc3aa4cfea971f220a4 (patch)
tree8e60c3a2a41879f8b2a52516fa416b3ab906e239 /apps/plugins/greyscale.c
parent35677cbc54bbe400ebbff59b489dda7ca7f04916 (diff)
downloadrockbox-23d9812273d9c74af72ccdc3aa4cfea971f220a4.tar.gz
rockbox-23d9812273d9c74af72ccdc3aa4cfea971f220a4.tar.bz2
rockbox-23d9812273d9c74af72ccdc3aa4cfea971f220a4.zip
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/greyscale.c')
-rw-r--r--apps/plugins/greyscale.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/apps/plugins/greyscale.c b/apps/plugins/greyscale.c
index cd8db5bf8b..2cd373ea9b 100644
--- a/apps/plugins/greyscale.c
+++ b/apps/plugins/greyscale.c
@@ -104,7 +104,6 @@ PLUGIN_HEADER
/******************************* Globals ***********************************/
GREY_INFO_STRUCT
-static const struct plugin_api* rb; /* global api struct pointer */
static char pbuf[32]; /* global printf buffer */
static unsigned char *gbuf;
static size_t gbuf_size = 0;
@@ -117,7 +116,7 @@ void cleanup(void *parameter)
grey_release(); /* switch off overlay and deinitialize */
/* 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 */
}
/* this is only a demo of what the framework can do */
@@ -202,7 +201,7 @@ int main(void)
};
/* Turn off backlight timeout */
- backlight_force_on(rb); /* backlight control in lib/helper.c */
+ backlight_force_on(); /* backlight control in lib/helper.c */
rb->lcd_setfont(FONT_SYSFIXED); /* select default font */
@@ -212,7 +211,7 @@ int main(void)
/* initialize the greyscale buffer:
Archos: 112 pixels wide, 7 rows (56 pixels) high.
H1x0: 160 pixels wide, 30 rows (120 pixels) high. */
- if (!grey_init(rb, gbuf, gbuf_size, GREY_BUFFERED|GREY_ON_COP,
+ if (!grey_init(gbuf, gbuf_size, GREY_BUFFERED|GREY_ON_COP,
LCD_WIDTH, GFX_HEIGHT, NULL))
{
rb->splash(HZ, "Not enough memory.");
@@ -363,9 +362,8 @@ int main(void)
/*************************** Plugin entry point ****************************/
-enum plugin_status plugin_start(const struct plugin_api* api, const void* parameter)
+enum plugin_status plugin_start(const void* parameter)
{
- rb = api; /* copy to global api pointer */
(void)parameter;
return main();