forked from len0rd/rockbox
jpeg viewer: keep backlight on. Patch 5652 by Matthias Mohr plus some changes by me.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10207 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
b437061b0b
commit
ac13e52522
1 changed files with 14 additions and 0 deletions
|
@ -2785,12 +2785,26 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
|
|||
|
||||
buf_images = buf; buf_images_size = buf_size;
|
||||
|
||||
/* make sure the backlight is always on when viewing pictures
|
||||
(actually it should also set the timeout when plugged in,
|
||||
but the function backlight_set_timeout_plugged is not
|
||||
available in plugins) */
|
||||
#ifdef CONFIG_BACKLIGHT
|
||||
if (rb->global_settings->backlight_timeout > 0)
|
||||
rb->backlight_set_timeout(1);
|
||||
#endif
|
||||
|
||||
do
|
||||
{
|
||||
condition = load_and_show(np_file);
|
||||
}while (condition != PLUGIN_OK && condition != PLUGIN_USB_CONNECTED
|
||||
&& condition != PLUGIN_ERROR);
|
||||
|
||||
#ifdef CONFIG_BACKLIGHT
|
||||
/* reset backlight settings */
|
||||
rb->backlight_set_timeout(rb->global_settings->backlight_timeout);
|
||||
#endif
|
||||
|
||||
#ifdef USEGSLIB
|
||||
gray_release(); /* deinitialize */
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue