diff options
Diffstat (limited to 'apps/plugins/test_grey.c')
-rw-r--r-- | apps/plugins/test_grey.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/apps/plugins/test_grey.c b/apps/plugins/test_grey.c index 1b65c34f4e..84dcdae3e2 100644 --- a/apps/plugins/test_grey.c +++ b/apps/plugins/test_grey.c | |||
@@ -108,7 +108,6 @@ static const unsigned char dither_matrix[16][16] = { | |||
108 | static unsigned char input_levels[STEPS+1]; | 108 | static unsigned char input_levels[STEPS+1]; |
109 | static unsigned char lcd_levels[STEPS+1]; | 109 | static unsigned char lcd_levels[STEPS+1]; |
110 | 110 | ||
111 | static const struct plugin_api* rb; | ||
112 | static unsigned char *gbuf; | 111 | static unsigned char *gbuf; |
113 | static size_t gbuf_size = 0; | 112 | static size_t gbuf_size = 0; |
114 | 113 | ||
@@ -139,7 +138,7 @@ static void fill_rastered(int bx, int by, int bw, int bh, int step) | |||
139 | } | 138 | } |
140 | 139 | ||
141 | /* plugin entry point */ | 140 | /* plugin entry point */ |
142 | enum plugin_status plugin_start(const struct plugin_api* api, const void* parameter) | 141 | enum plugin_status plugin_start(const void* parameter) |
143 | { | 142 | { |
144 | bool done = false; | 143 | bool done = false; |
145 | int cur_step = 1; | 144 | int cur_step = 1; |
@@ -148,11 +147,10 @@ enum plugin_status plugin_start(const struct plugin_api* api, const void* parame | |||
148 | 147 | ||
149 | /* standard stuff */ | 148 | /* standard stuff */ |
150 | (void)parameter; | 149 | (void)parameter; |
151 | rb = api; | ||
152 | 150 | ||
153 | gbuf = (unsigned char *) rb->plugin_get_buffer(&gbuf_size); | 151 | gbuf = (unsigned char *) rb->plugin_get_buffer(&gbuf_size); |
154 | 152 | ||
155 | if (!grey_init(rb, gbuf, gbuf_size, | 153 | if (!grey_init(gbuf, gbuf_size, |
156 | GREY_BUFFERED|GREY_RAWMAPPED|GREY_ON_COP, | 154 | GREY_BUFFERED|GREY_RAWMAPPED|GREY_ON_COP, |
157 | LCD_WIDTH, LCD_HEIGHT, NULL)) | 155 | LCD_WIDTH, LCD_HEIGHT, NULL)) |
158 | { | 156 | { |
@@ -162,7 +160,7 @@ enum plugin_status plugin_start(const struct plugin_api* api, const void* parame | |||
162 | for (i = 0; i <= STEPS; i++) | 160 | for (i = 0; i <= STEPS; i++) |
163 | input_levels[i] = lcd_levels[i] = (255 * i + (STEPS/2)) / STEPS; | 161 | input_levels[i] = lcd_levels[i] = (255 * i + (STEPS/2)) / STEPS; |
164 | 162 | ||
165 | backlight_force_on(rb); /* backlight control in lib/helper.c */ | 163 | backlight_force_on(); /* backlight control in lib/helper.c */ |
166 | 164 | ||
167 | grey_set_background(0); /* set background to black */ | 165 | grey_set_background(0); /* set background to black */ |
168 | grey_clear_display(); | 166 | grey_clear_display(); |
@@ -240,6 +238,6 @@ enum plugin_status plugin_start(const struct plugin_api* api, const void* parame | |||
240 | } | 238 | } |
241 | 239 | ||
242 | grey_release(); | 240 | grey_release(); |
243 | backlight_use_settings(rb); /* backlight control in lib/helper.c */ | 241 | backlight_use_settings(); /* backlight control in lib/helper.c */ |
244 | return PLUGIN_OK; | 242 | return PLUGIN_OK; |
245 | } | 243 | } |