diff options
author | Peter D'Hoye <peter.dhoye@gmail.com> | 2006-07-12 23:15:16 +0000 |
---|---|---|
committer | Peter D'Hoye <peter.dhoye@gmail.com> | 2006-07-12 23:15:16 +0000 |
commit | ac13e52522dac375096a65264ceae00afb3c5973 (patch) | |
tree | 50f1543f20366a7a51c214744122a68d47aa3a8e /apps/plugins/jpeg.c | |
parent | b437061b0be07360256379faa7117cca0642fed1 (diff) | |
download | rockbox-ac13e52522dac375096a65264ceae00afb3c5973.tar.gz rockbox-ac13e52522dac375096a65264ceae00afb3c5973.zip |
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/plugins/jpeg.c')
-rw-r--r-- | apps/plugins/jpeg.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/apps/plugins/jpeg.c b/apps/plugins/jpeg.c index 5656aee7eb..890ee8e252 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) | |||
2785 | 2785 | ||
2786 | buf_images = buf; buf_images_size = buf_size; | 2786 | buf_images = buf; buf_images_size = buf_size; |
2787 | 2787 | ||
2788 | /* make sure the backlight is always on when viewing pictures | ||
2789 | (actually it should also set the timeout when plugged in, | ||
2790 | but the function backlight_set_timeout_plugged is not | ||
2791 | available in plugins) */ | ||
2792 | #ifdef CONFIG_BACKLIGHT | ||
2793 | if (rb->global_settings->backlight_timeout > 0) | ||
2794 | rb->backlight_set_timeout(1); | ||
2795 | #endif | ||
2796 | |||
2788 | do | 2797 | do |
2789 | { | 2798 | { |
2790 | condition = load_and_show(np_file); | 2799 | condition = load_and_show(np_file); |
2791 | }while (condition != PLUGIN_OK && condition != PLUGIN_USB_CONNECTED | 2800 | }while (condition != PLUGIN_OK && condition != PLUGIN_USB_CONNECTED |
2792 | && condition != PLUGIN_ERROR); | 2801 | && condition != PLUGIN_ERROR); |
2793 | 2802 | ||
2803 | #ifdef CONFIG_BACKLIGHT | ||
2804 | /* reset backlight settings */ | ||
2805 | rb->backlight_set_timeout(rb->global_settings->backlight_timeout); | ||
2806 | #endif | ||
2807 | |||
2794 | #ifdef USEGSLIB | 2808 | #ifdef USEGSLIB |
2795 | gray_release(); /* deinitialize */ | 2809 | gray_release(); /* deinitialize */ |
2796 | #endif | 2810 | #endif |