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:
Peter D'Hoye 2007-08-16 23:01:18 +00:00
parent 735ab889d2
commit 767c0ec589
20 changed files with 54 additions and 51 deletions

View file

@ -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