diff options
| author | Peter D'Hoye <peter.dhoye@gmail.com> | 2007-08-13 22:31:11 +0000 |
|---|---|---|
| committer | Peter D'Hoye <peter.dhoye@gmail.com> | 2007-08-13 22:31:11 +0000 |
| commit | a5d4d67763a01f27453ae453c73e2bc4695131f9 (patch) | |
| tree | 4c15a114b24ba96ec7f9096b06051c9d2f55c625 /apps/plugins/mpegplayer | |
| parent | 07a09041d6ca8c84280e9f9b372e8cc0eeb8166e (diff) | |
| download | rockbox-a5d4d67763a01f27453ae453c73e2bc4695131f9.zip rockbox-a5d4d67763a01f27453ae453c73e2bc4695131f9.tar.gz rockbox-a5d4d67763a01f27453ae453c73e2bc4695131f9.tar.bz2 rockbox-a5d4d67763a01f27453ae453c73e2bc4695131f9.tar.xz | |
Also keep the backlight on in mpegplayer when plugged in. Fixes FS #7584. Created two helper functions for this, because this issue also exists in other plugins (to do). The helper functions are in the pluginlib in helper.[ch], where other common stuff can be put.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14321 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins/mpegplayer')
| -rw-r--r-- | apps/plugins/mpegplayer/mpegplayer.c | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/apps/plugins/mpegplayer/mpegplayer.c b/apps/plugins/mpegplayer/mpegplayer.c index 273e01b..f4da970 100644 --- a/apps/plugins/mpegplayer/mpegplayer.c +++ b/apps/plugins/mpegplayer/mpegplayer.c @@ -104,6 +104,7 @@ FPS | 27Mhz | 100Hz | 44.1KHz | 48KHz #include "plugin.h" #include "gray.h" +#include "helper.h" #include "mpeg2.h" #include "mpeg_settings.h" @@ -1856,14 +1857,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) rb->lcd_clear_display(); rb->lcd_update(); - /* make sure the backlight is always on when viewing video - (actually it should also set the timeout when plugged in, - but the function backlight_set_timeout_plugged is not - available in plugins) */ -#ifdef HAVE_BACKLIGHT - if (rb->global_settings->backlight_timeout > 0) - rb->backlight_set_timeout(1); -#endif + backlight_force_on(); #ifdef HAVE_ADJUSTABLE_CPU_FREQ rb->cpu_boost(true); @@ -2000,10 +1994,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) rb->pcm_set_frequency(HW_SAMPR_DEFAULT); -#ifdef HAVE_BACKLIGHT - /* reset backlight settings */ - rb->backlight_set_timeout(rb->global_settings->backlight_timeout); -#endif + backlight_use_settings(); return status; } |