From a3398a21435045fb6af1af14cc5638fd0cb52119 Mon Sep 17 00:00:00 2001 From: Solomon Peachy Date: Fri, 24 Jul 2020 18:14:32 -0400 Subject: plugins: Fix the builds for targets lacking HAVE_BACKLIGHT Change-Id: Ifdb1501834b7ea63ca6f731bbd6414305d7e0001 --- apps/plugins/lua/rocklib.c | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) (limited to 'apps/plugins/lua') 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 -- cgit v1.2.3