mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-13 18:17:39 -04:00
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
This commit is contained in:
parent
07a09041d6
commit
a5d4d67763
6 changed files with 88 additions and 14 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue