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 | |
parent | 18f13b149a4ce6d3b16c0b91de4d571d1860b66f (diff) | |
download | rockbox-1f2df74079ecb399d33069a6f6ba9eb1744b0e8a.tar.gz rockbox-1f2df74079ecb399d33069a6f6ba9eb1744b0e8a.zip |
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')
-rw-r--r-- | apps/plugins/lib/helper.c | 17 | ||||
-rw-r--r-- | apps/plugins/lib/helper.h | 11 |
2 files changed, 28 insertions, 0 deletions
diff --git a/apps/plugins/lib/helper.c b/apps/plugins/lib/helper.c index 691a17f15c..273b066599 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) | |||
91 | rb->buttonlight_set_timeout(rb->global_settings->buttonlight_timeout); | 91 | rb->buttonlight_set_timeout(rb->global_settings->buttonlight_timeout); |
92 | } | 92 | } |
93 | #endif /* HAVE_BUTTON_LIGHT */ | 93 | #endif /* HAVE_BUTTON_LIGHT */ |
94 | |||
95 | #ifdef HAVE_BACKLIGHT_BRIGHTNESS | ||
96 | void backlight_brightness_set(const struct plugin_api *rb, | ||
97 | int brightness) | ||
98 | { | ||
99 | if (!rb) | ||
100 | return; | ||
101 | rb->backlight_set_brightness(brightness); | ||
102 | } | ||
103 | |||
104 | void backlight_brightness_use_setting(const struct plugin_api *rb) | ||
105 | { | ||
106 | if (!rb) | ||
107 | return; | ||
108 | rb->backlight_set_brightness(rb->global_settings->brightness); | ||
109 | } | ||
110 | #endif /* HAVE_BACKLIGHT_BRIGHTNESS */ | ||
diff --git a/apps/plugins/lib/helper.h b/apps/plugins/lib/helper.h index d34e6334f0..eb52a8bfdc 100644 --- a/apps/plugins/lib/helper.h +++ b/apps/plugins/lib/helper.h | |||
@@ -34,4 +34,15 @@ void remote_backlight_use_settings(const struct plugin_api* rb); | |||
34 | void buttonlight_force_on(const struct plugin_api* rb); | 34 | void buttonlight_force_on(const struct plugin_api* rb); |
35 | void buttonlight_use_settings(const struct plugin_api* rb); | 35 | void buttonlight_use_settings(const struct plugin_api* rb); |
36 | #endif | 36 | #endif |
37 | |||
38 | /** | ||
39 | * Backlight brightness adjustment settings | ||
40 | */ | ||
41 | #ifdef HAVE_BACKLIGHT_BRIGHTNESS | ||
42 | void backlight_brightness_set(const struct plugin_api *rb, | ||
43 | int brightness); | ||
44 | void backlight_brightness_use_setting(const struct plugin_api *rb); | ||
37 | #endif | 45 | #endif |
46 | |||
47 | |||
48 | #endif /* _LIB_HELPER_H_ */ | ||