summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorPeter D'Hoye <peter.dhoye@gmail.com>2006-07-12 23:15:16 +0000
committerPeter D'Hoye <peter.dhoye@gmail.com>2006-07-12 23:15:16 +0000
commitac13e52522dac375096a65264ceae00afb3c5973 (patch)
tree50f1543f20366a7a51c214744122a68d47aa3a8e /apps
parentb437061b0be07360256379faa7117cca0642fed1 (diff)
downloadrockbox-ac13e52522dac375096a65264ceae00afb3c5973.zip
rockbox-ac13e52522dac375096a65264ceae00afb3c5973.tar.gz
rockbox-ac13e52522dac375096a65264ceae00afb3c5973.tar.bz2
rockbox-ac13e52522dac375096a65264ceae00afb3c5973.tar.xz
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
Diffstat (limited to 'apps')
-rw-r--r--apps/plugins/jpeg.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/apps/plugins/jpeg.c b/apps/plugins/jpeg.c
index 5656aee..890ee8e 100644
--- a/apps/plugins/jpeg.c
+++ b/apps/plugins/jpeg.c
@@ -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