mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-13 18:17:39 -04:00
Pass plugin api pointer to funtion directly, fixes crashes when doing incremental builds. Fix incorrect backlight changes in rockblox introduced recently.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14373 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
735ab889d2
commit
767c0ec589
20 changed files with 54 additions and 51 deletions
|
@ -19,16 +19,14 @@
|
|||
|
||||
#include "plugin.h"
|
||||
|
||||
/* the plugin must declare the plugin_api struct pointer itself */
|
||||
extern struct plugin_api* rb;
|
||||
|
||||
/*
|
||||
* force the backlight on
|
||||
* now enabled regardless of HAVE_BACKLIGHT because it is not needed to
|
||||
* build and makes modded targets easier to update
|
||||
*/
|
||||
void backlight_force_on(void)
|
||||
void backlight_force_on(struct plugin_api* rb)
|
||||
{
|
||||
if(!rb) return;
|
||||
/* #ifdef HAVE_BACKLIGHT */
|
||||
if (rb->global_settings->backlight_timeout > 1)
|
||||
rb->backlight_set_timeout(1);
|
||||
|
@ -44,8 +42,9 @@ void backlight_force_on(void)
|
|||
* now enabled regardless of HAVE_BACKLIGHT because it is not needed to
|
||||
* build and makes modded targets easier to update
|
||||
*/
|
||||
void backlight_use_settings(void)
|
||||
void backlight_use_settings(struct plugin_api* rb)
|
||||
{
|
||||
if(!rb) return;
|
||||
/* #ifdef HAVE_BACKLIGHT */
|
||||
rb->backlight_set_timeout(rb->global_settings->backlight_timeout);
|
||||
#if CONFIG_CHARGING
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue