diff options
author | Solomon Peachy <pizza@shaftnet.org> | 2020-07-24 18:14:32 -0400 |
---|---|---|
committer | Solomon Peachy <pizza@shaftnet.org> | 2020-07-24 18:17:19 -0400 |
commit | a3398a21435045fb6af1af14cc5638fd0cb52119 (patch) | |
tree | 701d1f73cc89742ea4ae21d11a60f2f029284099 /apps/plugins/lua | |
parent | 5dbb7576700fad81d6ab722b96620fdbbf462be4 (diff) | |
download | rockbox-a3398a21435045fb6af1af14cc5638fd0cb52119.tar.gz 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.c | 22 |
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) | |||
579 | return 1; | 579 | return 1; |
580 | } | 580 | } |
581 | 581 | ||
582 | #ifdef HAVE_BACKLIGHT | ||
582 | /* DEVICE LIGHTING CONTROL */ | 583 | /* DEVICE LIGHTING CONTROL */ |
583 | RB_WRAP(backlight_onoff) | 584 | RB_WRAP(backlight_onoff) |
584 | { | 585 | { |
@@ -599,11 +600,6 @@ SIMPLE_VOID_WRAPPER(remote_backlight_force_on); | |||
599 | SIMPLE_VOID_WRAPPER(remote_backlight_use_settings); | 600 | SIMPLE_VOID_WRAPPER(remote_backlight_use_settings); |
600 | #endif | 601 | #endif |
601 | 602 | ||
602 | #ifdef HAVE_BUTTON_LIGHT | ||
603 | SIMPLE_VOID_WRAPPER(buttonlight_force_on); | ||
604 | SIMPLE_VOID_WRAPPER(buttonlight_use_settings); | ||
605 | #endif | ||
606 | |||
607 | #ifdef HAVE_BACKLIGHT_BRIGHTNESS | 603 | #ifdef HAVE_BACKLIGHT_BRIGHTNESS |
608 | RB_WRAP(backlight_brightness_set) | 604 | RB_WRAP(backlight_brightness_set) |
609 | { | 605 | { |
@@ -618,6 +614,12 @@ RB_WRAP(backlight_brightness_set) | |||
618 | return 0; | 614 | return 0; |
619 | } | 615 | } |
620 | #endif | 616 | #endif |
617 | #endif /* HAVE_BACKLIGHT */ | ||
618 | |||
619 | #ifdef HAVE_BUTTON_LIGHT | ||
620 | SIMPLE_VOID_WRAPPER(buttonlight_force_on); | ||
621 | SIMPLE_VOID_WRAPPER(buttonlight_use_settings); | ||
622 | #endif | ||
621 | 623 | ||
622 | #ifdef HAVE_BUTTONLIGHT_BRIGHTNESS | 624 | #ifdef HAVE_BUTTONLIGHT_BRIGHTNESS |
623 | RB_WRAP(buttonlight_brightness_set) | 625 | RB_WRAP(buttonlight_brightness_set) |
@@ -954,6 +956,7 @@ static const luaL_Reg rocklib[] = | |||
954 | RB_FUNC(pcm), | 956 | RB_FUNC(pcm), |
955 | RB_FUNC(mixer_frequency), | 957 | RB_FUNC(mixer_frequency), |
956 | 958 | ||
959 | #ifdef HAVE_BACKLIGHT | ||
957 | /* DEVICE LIGHTING CONTROL */ | 960 | /* DEVICE LIGHTING CONTROL */ |
958 | RB_FUNC(backlight_onoff), | 961 | RB_FUNC(backlight_onoff), |
959 | 962 | ||
@@ -966,15 +969,16 @@ static const luaL_Reg rocklib[] = | |||
966 | RB_FUNC(remote_backlight_use_settings), | 969 | RB_FUNC(remote_backlight_use_settings), |
967 | #endif | 970 | #endif |
968 | 971 | ||
972 | #ifdef HAVE_BACKLIGHT_BRIGHTNESS | ||
973 | RB_FUNC(backlight_brightness_set), | ||
974 | #endif | ||
975 | #endif /* HAVE_BACKLIGHT */ | ||
976 | |||
969 | #ifdef HAVE_BUTTON_LIGHT | 977 | #ifdef HAVE_BUTTON_LIGHT |
970 | RB_FUNC(buttonlight_force_on), | 978 | RB_FUNC(buttonlight_force_on), |
971 | RB_FUNC(buttonlight_use_settings), | 979 | RB_FUNC(buttonlight_use_settings), |
972 | #endif | 980 | #endif |
973 | 981 | ||
974 | #ifdef HAVE_BACKLIGHT_BRIGHTNESS | ||
975 | RB_FUNC(backlight_brightness_set), | ||
976 | #endif | ||
977 | |||
978 | #ifdef HAVE_BUTTONLIGHT_BRIGHTNESS | 982 | #ifdef HAVE_BUTTONLIGHT_BRIGHTNESS |
979 | RB_FUNC(buttonlight_brightness_set), | 983 | RB_FUNC(buttonlight_brightness_set), |
980 | #endif | 984 | #endif |