mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-14 02:27:39 -04:00
plugins: HAVE_BACKLIGHT in the test plugins
Change-Id: I97d17805ac7d37f10da6a29684102db97448e653
This commit is contained in:
parent
9be5bc4cf0
commit
e49c1af570
5 changed files with 22 additions and 8 deletions
|
@ -274,8 +274,9 @@ static int fill_buffer(int new_offset){
|
||||||
{
|
{
|
||||||
log_text("Read failed.",true);
|
log_text("Read failed.",true);
|
||||||
DEBUGF("read fail: got %d bytes, expected %d\n", (int)n, (int)audiobufsize);
|
DEBUGF("read fail: got %d bytes, expected %d\n", (int)n, (int)audiobufsize);
|
||||||
|
#ifdef HAVE_BACKLIGHT
|
||||||
rb->backlight_on();
|
rb->backlight_on();
|
||||||
|
#endif
|
||||||
if (fd >= 0)
|
if (fd >= 0)
|
||||||
{
|
{
|
||||||
rb->close(fd);
|
rb->close(fd);
|
||||||
|
@ -723,7 +724,9 @@ static enum plugin_status test_track(const char* filename)
|
||||||
|
|
||||||
/* Be sure it is done */
|
/* Be sure it is done */
|
||||||
rb->codec_thread_do_callback(NULL, NULL);
|
rb->codec_thread_do_callback(NULL, NULL);
|
||||||
|
#ifdef HAVE_BACKLIGHT
|
||||||
rb->backlight_on();
|
rb->backlight_on();
|
||||||
|
#endif
|
||||||
log_text(str,true);
|
log_text(str,true);
|
||||||
|
|
||||||
if (codec_action == CODEC_ACTION_HALT)
|
if (codec_action == CODEC_ACTION_HALT)
|
||||||
|
@ -771,8 +774,9 @@ static enum plugin_status test_track(const char* filename)
|
||||||
res = PLUGIN_OK;
|
res = PLUGIN_OK;
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
|
#ifdef HAVE_BACKLIGHT
|
||||||
rb->backlight_on();
|
rb->backlight_on();
|
||||||
|
#endif
|
||||||
if (fd >= 0)
|
if (fd >= 0)
|
||||||
{
|
{
|
||||||
rb->close(fd);
|
rb->close(fd);
|
||||||
|
|
|
@ -467,8 +467,10 @@ enum plugin_status plugin_start(const void* parameter)
|
||||||
|
|
||||||
rb->srand(*rb->current_tick);
|
rb->srand(*rb->current_tick);
|
||||||
|
|
||||||
|
#ifdef HAVE_BACKLIGHT
|
||||||
/* Turn off backlight timeout */
|
/* Turn off backlight timeout */
|
||||||
backlight_ignore_timeout();
|
backlight_ignore_timeout();
|
||||||
|
#endif
|
||||||
|
|
||||||
while(!quit)
|
while(!quit)
|
||||||
{
|
{
|
||||||
|
@ -487,8 +489,9 @@ enum plugin_status plugin_start(const void* parameter)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Turn on backlight timeout (revert to settings) */
|
/* Turn on backlight timeout (revert to settings) */
|
||||||
|
#ifdef HAVE_BACKLIGHT
|
||||||
backlight_use_settings();
|
backlight_use_settings();
|
||||||
|
#endif
|
||||||
rb->rmdir(testbasedir);
|
rb->rmdir(testbasedir);
|
||||||
|
|
||||||
return PLUGIN_OK;
|
return PLUGIN_OK;
|
||||||
|
|
|
@ -401,8 +401,9 @@ enum plugin_status plugin_start(const void* parameter)
|
||||||
#if (CONFIG_PLATFORM & PLATFORM_NATIVE)
|
#if (CONFIG_PLATFORM & PLATFORM_NATIVE)
|
||||||
cpu_freq = *rb->cpu_frequency; /* remember CPU frequency */
|
cpu_freq = *rb->cpu_frequency; /* remember CPU frequency */
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef HAVE_BACKLIGHT
|
||||||
backlight_ignore_timeout();
|
backlight_ignore_timeout();
|
||||||
|
#endif
|
||||||
time_main_update();
|
time_main_update();
|
||||||
rb->sleep(HZ);
|
rb->sleep(HZ);
|
||||||
#if defined(HAVE_LCD_COLOR) && (MEMORYSIZE > 2)
|
#if defined(HAVE_LCD_COLOR) && (MEMORYSIZE > 2)
|
||||||
|
@ -423,8 +424,9 @@ enum plugin_status plugin_start(const void* parameter)
|
||||||
(cpu_freq + 500000) / 1000000);
|
(cpu_freq + 500000) / 1000000);
|
||||||
log_text(str);
|
log_text(str);
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef HAVE_BACKLIGHT
|
||||||
backlight_use_settings();
|
backlight_use_settings();
|
||||||
|
#endif
|
||||||
/* wait until user closes plugin */
|
/* wait until user closes plugin */
|
||||||
plugin_quit();
|
plugin_quit();
|
||||||
|
|
||||||
|
|
|
@ -495,8 +495,9 @@ enum plugin_status plugin_start(const void* parameter)
|
||||||
rb->lcd_set_backdrop(NULL);
|
rb->lcd_set_backdrop(NULL);
|
||||||
rb->lcd_clear_display();
|
rb->lcd_clear_display();
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef HAVE_BACKLIGHT
|
||||||
backlight_ignore_timeout();
|
backlight_ignore_timeout();
|
||||||
|
#endif
|
||||||
rb->splashf(0, "LCD driver performance test, please wait %d sec",
|
rb->splashf(0, "LCD driver performance test, please wait %d sec",
|
||||||
7*4*DURATION/HZ);
|
7*4*DURATION/HZ);
|
||||||
init_rand_table();
|
init_rand_table();
|
||||||
|
@ -521,7 +522,9 @@ enum plugin_status plugin_start(const void* parameter)
|
||||||
(cpu_freq + 500000) / 1000000);
|
(cpu_freq + 500000) / 1000000);
|
||||||
#endif
|
#endif
|
||||||
rb->close(log_fd);
|
rb->close(log_fd);
|
||||||
|
#ifdef HAVE_BACKLIGHT
|
||||||
backlight_use_settings();
|
backlight_use_settings();
|
||||||
|
#endif
|
||||||
#ifdef TEST_GREYLIB
|
#ifdef TEST_GREYLIB
|
||||||
grey_release();
|
grey_release();
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -123,9 +123,9 @@ enum plugin_status plugin_start(const void* parameter)
|
||||||
}
|
}
|
||||||
for (i = 0; i <= STEPS; i++)
|
for (i = 0; i <= STEPS; i++)
|
||||||
input_levels[i] = lcd_levels[i] = (255 * i + (STEPS/2)) / STEPS;
|
input_levels[i] = lcd_levels[i] = (255 * i + (STEPS/2)) / STEPS;
|
||||||
|
#ifdef HAVE_BACKLIGHT
|
||||||
backlight_ignore_timeout();
|
backlight_ignore_timeout();
|
||||||
|
#endif
|
||||||
grey_set_background(0); /* set background to black */
|
grey_set_background(0); /* set background to black */
|
||||||
grey_clear_display();
|
grey_clear_display();
|
||||||
grey_show(true);
|
grey_show(true);
|
||||||
|
@ -221,6 +221,8 @@ enum plugin_status plugin_start(const void* parameter)
|
||||||
}
|
}
|
||||||
|
|
||||||
grey_release();
|
grey_release();
|
||||||
|
#ifdef HAVE_BACKLIGHT
|
||||||
backlight_use_settings();
|
backlight_use_settings();
|
||||||
|
#endif
|
||||||
return PLUGIN_OK;
|
return PLUGIN_OK;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue