summaryrefslogtreecommitdiff
path: root/apps/plugins/pictureflow.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins/pictureflow.c')
-rw-r--r--apps/plugins/pictureflow.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/apps/plugins/pictureflow.c b/apps/plugins/pictureflow.c
index d06f99dfd8..1489c40801 100644
--- a/apps/plugins/pictureflow.c
+++ b/apps/plugins/pictureflow.c
@@ -34,8 +34,6 @@ PLUGIN_HEADER
34 34
35/******************************* Globals ***********************************/ 35/******************************* Globals ***********************************/
36 36
37static const struct plugin_api *rb; /* global api struct pointer */
38
39const struct button_mapping *plugin_contexts[] 37const struct button_mapping *plugin_contexts[]
40= {generic_actions, generic_directions}; 38= {generic_actions, generic_directions};
41 39
@@ -1451,7 +1449,7 @@ void cleanup(void *parameter)
1451{ 1449{
1452 (void) parameter; 1450 (void) parameter;
1453 /* Turn on backlight timeout (revert to settings) */ 1451 /* Turn on backlight timeout (revert to settings) */
1454 backlight_use_settings(rb); /* backlight control in lib/helper.c */ 1452 backlight_use_settings(); /* backlight control in lib/helper.c */
1455 1453
1456 int i; 1454 int i;
1457 for (i = 0; i < slide_cache_in_use; i++) { 1455 for (i = 0; i < slide_cache_in_use; i++) {
@@ -1952,7 +1950,7 @@ int main(void)
1952 slide_cache_stack_index = min_slide_cache-1; 1950 slide_cache_stack_index = min_slide_cache-1;
1953 slide_cache_in_use = 0; 1951 slide_cache_in_use = 0;
1954#ifdef USEGSLIB 1952#ifdef USEGSLIB
1955 if (!grey_init(rb, plugin_buf, plugin_buf_size, GREY_BUFFERED|GREY_ON_COP, 1953 if (!grey_init(plugin_buf, plugin_buf_size, GREY_BUFFERED|GREY_ON_COP,
1956 LCD_WIDTH, LCD_HEIGHT, NULL)) 1954 LCD_WIDTH, LCD_HEIGHT, NULL))
1957 rb->splash(HZ, "Greylib init failed!"); 1955 rb->splash(HZ, "Greylib init failed!");
1958 grey_setfont(FONT_UI); 1956 grey_setfont(FONT_UI);
@@ -2050,7 +2048,7 @@ int main(void)
2050 rb->yield(); 2048 rb->yield();
2051 2049
2052 /*/ Handle buttons */ 2050 /*/ Handle buttons */
2053 button = pluginlib_getaction(rb, instant_update ? 0 : HZ/16, 2051 button = pluginlib_getaction(instant_update ? 0 : HZ/16,
2054 plugin_contexts, NB_ACTION_CONTEXTS); 2052 plugin_contexts, NB_ACTION_CONTEXTS);
2055 2053
2056 switch (button) { 2054 switch (button) {
@@ -2130,18 +2128,16 @@ int main(void)
2130 2128
2131/*************************** Plugin entry point ****************************/ 2129/*************************** Plugin entry point ****************************/
2132 2130
2133enum plugin_status plugin_start(const struct plugin_api *api, 2131enum plugin_status plugin_start(const void *parameter)
2134 const void *parameter)
2135{ 2132{
2136 int ret; 2133 int ret;
2137 2134
2138 rb = api; /* copy to global api pointer */
2139 (void) parameter; 2135 (void) parameter;
2140#if LCD_DEPTH > 1 2136#if LCD_DEPTH > 1
2141 rb->lcd_set_backdrop(NULL); 2137 rb->lcd_set_backdrop(NULL);
2142#endif 2138#endif
2143 /* Turn off backlight timeout */ 2139 /* Turn off backlight timeout */
2144 backlight_force_on(rb); /* backlight control in lib/helper.c */ 2140 backlight_force_on(); /* backlight control in lib/helper.c */
2145#ifdef HAVE_ADJUSTABLE_CPU_FREQ 2141#ifdef HAVE_ADJUSTABLE_CPU_FREQ
2146 rb->cpu_boost(true); 2142 rb->cpu_boost(true);
2147#endif 2143#endif