diff options
| author | Michael Sevakis <jethead71@rockbox.org> | 2008-05-18 00:14:34 +0000 |
|---|---|---|
| committer | Michael Sevakis <jethead71@rockbox.org> | 2008-05-18 00:14:34 +0000 |
| commit | 1f2df74079ecb399d33069a6f6ba9eb1744b0e8a (patch) | |
| tree | 09ba2f1fdc7a4a84abcb5643bdb16d4218aae23f /apps/plugins/lib/helper.c | |
| parent | 18f13b149a4ce6d3b16c0b91de4d571d1860b66f (diff) | |
| download | rockbox-1f2df74079ecb399d33069a6f6ba9eb1744b0e8a.zip rockbox-1f2df74079ecb399d33069a6f6ba9eb1744b0e8a.tar.gz rockbox-1f2df74079ecb399d33069a6f6ba9eb1744b0e8a.tar.bz2 rockbox-1f2df74079ecb399d33069a6f6ba9eb1744b0e8a.tar.xz | |
MPEGPlayer quickie: add an option to set the backlight brightness to a plugin-specified value when playing video or interacting. Nice when one likes a dim backlight normally but that isn't sufficient when viewing video for instance. Suggested in FS#8417 in addition to my own desire for this.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17563 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins/lib/helper.c')
| -rw-r--r-- | apps/plugins/lib/helper.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/apps/plugins/lib/helper.c b/apps/plugins/lib/helper.c index 691a17f..273b066 100644 --- a/apps/plugins/lib/helper.c +++ b/apps/plugins/lib/helper.c @@ -91,3 +91,20 @@ void buttonlight_use_settings(const struct plugin_api* rb) rb->buttonlight_set_timeout(rb->global_settings->buttonlight_timeout); } #endif /* HAVE_BUTTON_LIGHT */ + +#ifdef HAVE_BACKLIGHT_BRIGHTNESS +void backlight_brightness_set(const struct plugin_api *rb, + int brightness) +{ + if (!rb) + return; + rb->backlight_set_brightness(brightness); +} + +void backlight_brightness_use_setting(const struct plugin_api *rb) +{ + if (!rb) + return; + rb->backlight_set_brightness(rb->global_settings->brightness); +} +#endif /* HAVE_BACKLIGHT_BRIGHTNESS */ |