summaryrefslogtreecommitdiff
path: root/apps/plugins/test_fps.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins/test_fps.c')
-rw-r--r--apps/plugins/test_fps.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/apps/plugins/test_fps.c b/apps/plugins/test_fps.c
index 6d347738b7..c688a54de0 100644
--- a/apps/plugins/test_fps.c
+++ b/apps/plugins/test_fps.c
@@ -41,8 +41,6 @@ PLUGIN_IRAM_DECLARE
41 41
42PLUGIN_HEADER 42PLUGIN_HEADER
43 43
44static const struct plugin_api* rb;
45
46/* Screen logging */ 44/* Screen logging */
47static int line; 45static int line;
48static int max_line; 46static int max_line;
@@ -286,7 +284,7 @@ static void time_greyscale(void)
286 int fps, load; 284 int fps, load;
287 285
288 gbuf = (unsigned char *) rb->plugin_get_buffer(&gbuf_size); 286 gbuf = (unsigned char *) rb->plugin_get_buffer(&gbuf_size);
289 if (!grey_init(rb, gbuf, gbuf_size, GREY_ON_COP, 287 if (!grey_init(gbuf, gbuf_size, GREY_ON_COP,
290 LCD_WIDTH, LCD_HEIGHT, NULL)) 288 LCD_WIDTH, LCD_HEIGHT, NULL))
291 { 289 {
292 log_text("greylib: out of memory."); 290 log_text("greylib: out of memory.");
@@ -334,7 +332,7 @@ static void time_greyscale(void)
334#endif 332#endif
335 333
336/* plugin entry point */ 334/* plugin entry point */
337enum plugin_status plugin_start(const struct plugin_api* api, const void* parameter) 335enum plugin_status plugin_start(const void* parameter)
338{ 336{
339#ifndef SIMULATOR 337#ifndef SIMULATOR
340 char str[32]; 338 char str[32];
@@ -342,15 +340,14 @@ enum plugin_status plugin_start(const struct plugin_api* api, const void* parame
342#endif 340#endif
343 341
344 /* standard stuff */ 342 /* standard stuff */
345 PLUGIN_IRAM_INIT(api) 343 PLUGIN_IRAM_INIT(rb)
346 (void)parameter; 344 (void)parameter;
347 rb = api;
348 345
349 log_init(); 346 log_init();
350#ifndef SIMULATOR 347#ifndef SIMULATOR
351 cpu_freq = *rb->cpu_frequency; /* remember CPU frequency */ 348 cpu_freq = *rb->cpu_frequency; /* remember CPU frequency */
352#endif 349#endif
353 backlight_force_on(rb); /* backlight control in lib/helper.c */ 350 backlight_force_on(); /* backlight control in lib/helper.c */
354 351
355 log_text("Main LCD Update"); 352 log_text("Main LCD Update");
356 time_main_update(); 353 time_main_update();
@@ -375,7 +372,7 @@ enum plugin_status plugin_start(const struct plugin_api* api, const void* parame
375 (cpu_freq + 500000) / 1000000); 372 (cpu_freq + 500000) / 1000000);
376 log_text(str); 373 log_text(str);
377#endif 374#endif
378 backlight_use_settings(rb); /* backlight control in lib/helper.c */ 375 backlight_use_settings(); /* backlight control in lib/helper.c */
379 376
380 /* wait until user closes plugin */ 377 /* wait until user closes plugin */
381 while (rb->button_get(true) != FPS_QUIT); 378 while (rb->button_get(true) != FPS_QUIT);