summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
Diffstat (limited to 'apps')
-rw-r--r--apps/plugins/test_codec.c8
-rw-r--r--apps/plugins/test_disk.c5
-rw-r--r--apps/plugins/test_fps.c6
-rw-r--r--apps/plugins/test_gfx.c5
-rw-r--r--apps/plugins/test_grey.c6
5 files changed, 22 insertions, 8 deletions
diff --git a/apps/plugins/test_codec.c b/apps/plugins/test_codec.c
index 01efcf69e5..ac0dbf1633 100644
--- a/apps/plugins/test_codec.c
+++ b/apps/plugins/test_codec.c
@@ -274,8 +274,9 @@ static int fill_buffer(int new_offset){
{
log_text("Read failed.",true);
DEBUGF("read fail: got %d bytes, expected %d\n", (int)n, (int)audiobufsize);
+#ifdef HAVE_BACKLIGHT
rb->backlight_on();
-
+#endif
if (fd >= 0)
{
rb->close(fd);
@@ -723,7 +724,9 @@ static enum plugin_status test_track(const char* filename)
/* Be sure it is done */
rb->codec_thread_do_callback(NULL, NULL);
+#ifdef HAVE_BACKLIGHT
rb->backlight_on();
+#endif
log_text(str,true);
if (codec_action == CODEC_ACTION_HALT)
@@ -771,8 +774,9 @@ static enum plugin_status test_track(const char* filename)
res = PLUGIN_OK;
exit:
+#ifdef HAVE_BACKLIGHT
rb->backlight_on();
-
+#endif
if (fd >= 0)
{
rb->close(fd);
diff --git a/apps/plugins/test_disk.c b/apps/plugins/test_disk.c
index 339bcb8020..b689ba672e 100644
--- a/apps/plugins/test_disk.c
+++ b/apps/plugins/test_disk.c
@@ -467,8 +467,10 @@ enum plugin_status plugin_start(const void* parameter)
rb->srand(*rb->current_tick);
+#ifdef HAVE_BACKLIGHT
/* Turn off backlight timeout */
backlight_ignore_timeout();
+#endif
while(!quit)
{
@@ -487,8 +489,9 @@ enum plugin_status plugin_start(const void* parameter)
}
/* Turn on backlight timeout (revert to settings) */
+#ifdef HAVE_BACKLIGHT
backlight_use_settings();
-
+#endif
rb->rmdir(testbasedir);
return PLUGIN_OK;
diff --git a/apps/plugins/test_fps.c b/apps/plugins/test_fps.c
index 358ab827f3..ddf938ac25 100644
--- a/apps/plugins/test_fps.c
+++ b/apps/plugins/test_fps.c
@@ -401,8 +401,9 @@ enum plugin_status plugin_start(const void* parameter)
#if (CONFIG_PLATFORM & PLATFORM_NATIVE)
cpu_freq = *rb->cpu_frequency; /* remember CPU frequency */
#endif
+#ifdef HAVE_BACKLIGHT
backlight_ignore_timeout();
-
+#endif
time_main_update();
rb->sleep(HZ);
#if defined(HAVE_LCD_COLOR) && (MEMORYSIZE > 2)
@@ -423,8 +424,9 @@ enum plugin_status plugin_start(const void* parameter)
(cpu_freq + 500000) / 1000000);
log_text(str);
#endif
+#ifdef HAVE_BACKLIGHT
backlight_use_settings();
-
+#endif
/* wait until user closes plugin */
plugin_quit();
diff --git a/apps/plugins/test_gfx.c b/apps/plugins/test_gfx.c
index 51d8f40cd7..7734179159 100644
--- a/apps/plugins/test_gfx.c
+++ b/apps/plugins/test_gfx.c
@@ -495,8 +495,9 @@ enum plugin_status plugin_start(const void* parameter)
rb->lcd_set_backdrop(NULL);
rb->lcd_clear_display();
#endif
+#ifdef HAVE_BACKLIGHT
backlight_ignore_timeout();
-
+#endif
rb->splashf(0, "LCD driver performance test, please wait %d sec",
7*4*DURATION/HZ);
init_rand_table();
@@ -521,7 +522,9 @@ enum plugin_status plugin_start(const void* parameter)
(cpu_freq + 500000) / 1000000);
#endif
rb->close(log_fd);
+#ifdef HAVE_BACKLIGHT
backlight_use_settings();
+#endif
#ifdef TEST_GREYLIB
grey_release();
#endif
diff --git a/apps/plugins/test_grey.c b/apps/plugins/test_grey.c
index c4179df135..121cbad051 100644
--- a/apps/plugins/test_grey.c
+++ b/apps/plugins/test_grey.c
@@ -123,9 +123,9 @@ enum plugin_status plugin_start(const void* parameter)
}
for (i = 0; i <= STEPS; i++)
input_levels[i] = lcd_levels[i] = (255 * i + (STEPS/2)) / STEPS;
-
+#ifdef HAVE_BACKLIGHT
backlight_ignore_timeout();
-
+#endif
grey_set_background(0); /* set background to black */
grey_clear_display();
grey_show(true);
@@ -221,6 +221,8 @@ enum plugin_status plugin_start(const void* parameter)
}
grey_release();
+#ifdef HAVE_BACKLIGHT
backlight_use_settings();
+#endif
return PLUGIN_OK;
}