1
0
Fork 0
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:
Peter D'Hoye 2006-07-12 23:15:16 +00:00
parent b437061b0b
commit ac13e52522

View file

@ -2785,12 +2785,26 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
buf_images = buf; buf_images_size = buf_size; 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 do
{ {
condition = load_and_show(np_file); condition = load_and_show(np_file);
}while (condition != PLUGIN_OK && condition != PLUGIN_USB_CONNECTED }while (condition != PLUGIN_OK && condition != PLUGIN_USB_CONNECTED
&& condition != PLUGIN_ERROR); && condition != PLUGIN_ERROR);
#ifdef CONFIG_BACKLIGHT
/* reset backlight settings */
rb->backlight_set_timeout(rb->global_settings->backlight_timeout);
#endif
#ifdef USEGSLIB #ifdef USEGSLIB
gray_release(); /* deinitialize */ gray_release(); /* deinitialize */
#endif #endif