summaryrefslogtreecommitdiffstats
path: root/apps/plugins/lua
diff options
context:
space:
mode:
authorSolomon Peachy <pizza@shaftnet.org>2020-07-24 18:14:32 -0400
committerSolomon Peachy <pizza@shaftnet.org>2020-07-24 18:17:19 -0400
commita3398a21435045fb6af1af14cc5638fd0cb52119 (patch)
tree701d1f73cc89742ea4ae21d11a60f2f029284099 /apps/plugins/lua
parent5dbb7576700fad81d6ab722b96620fdbbf462be4 (diff)
downloadrockbox-a3398a21435045fb6af1af14cc5638fd0cb52119.tar.gz
rockbox-a3398a21435045fb6af1af14cc5638fd0cb52119.tar.bz2
rockbox-a3398a21435045fb6af1af14cc5638fd0cb52119.zip
plugins: Fix the builds for targets lacking HAVE_BACKLIGHT
Change-Id: Ifdb1501834b7ea63ca6f731bbd6414305d7e0001
Diffstat (limited to 'apps/plugins/lua')
-rw-r--r--apps/plugins/lua/rocklib.c22
1 files changed, 13 insertions, 9 deletions
diff --git a/apps/plugins/lua/rocklib.c b/apps/plugins/lua/rocklib.c
index e6eb543eda..8eab08f987 100644
--- a/apps/plugins/lua/rocklib.c
+++ b/apps/plugins/lua/rocklib.c
@@ -579,6 +579,7 @@ RB_WRAP(mixer_frequency)
return 1;
}
+#ifdef HAVE_BACKLIGHT
/* DEVICE LIGHTING CONTROL */
RB_WRAP(backlight_onoff)
{
@@ -599,11 +600,6 @@ SIMPLE_VOID_WRAPPER(remote_backlight_force_on);
SIMPLE_VOID_WRAPPER(remote_backlight_use_settings);
#endif
-#ifdef HAVE_BUTTON_LIGHT
-SIMPLE_VOID_WRAPPER(buttonlight_force_on);
-SIMPLE_VOID_WRAPPER(buttonlight_use_settings);
-#endif
-
#ifdef HAVE_BACKLIGHT_BRIGHTNESS
RB_WRAP(backlight_brightness_set)
{
@@ -618,6 +614,12 @@ RB_WRAP(backlight_brightness_set)
return 0;
}
#endif
+#endif /* HAVE_BACKLIGHT */
+
+#ifdef HAVE_BUTTON_LIGHT
+SIMPLE_VOID_WRAPPER(buttonlight_force_on);
+SIMPLE_VOID_WRAPPER(buttonlight_use_settings);
+#endif
#ifdef HAVE_BUTTONLIGHT_BRIGHTNESS
RB_WRAP(buttonlight_brightness_set)
@@ -954,6 +956,7 @@ static const luaL_Reg rocklib[] =
RB_FUNC(pcm),
RB_FUNC(mixer_frequency),
+#ifdef HAVE_BACKLIGHT
/* DEVICE LIGHTING CONTROL */
RB_FUNC(backlight_onoff),
@@ -966,15 +969,16 @@ static const luaL_Reg rocklib[] =
RB_FUNC(remote_backlight_use_settings),
#endif
+#ifdef HAVE_BACKLIGHT_BRIGHTNESS
+ RB_FUNC(backlight_brightness_set),
+#endif
+#endif /* HAVE_BACKLIGHT */
+
#ifdef HAVE_BUTTON_LIGHT
RB_FUNC(buttonlight_force_on),
RB_FUNC(buttonlight_use_settings),
#endif
-#ifdef HAVE_BACKLIGHT_BRIGHTNESS
- RB_FUNC(backlight_brightness_set),
-#endif
-
#ifdef HAVE_BUTTONLIGHT_BRIGHTNESS
RB_FUNC(buttonlight_brightness_set),
#endif