diff options
author | William Wilgus <wilgus.william@gmail.com> | 2022-11-23 23:00:29 -0500 |
---|---|---|
committer | William Wilgus <wilgus.william@gmail.com> | 2022-11-23 23:00:29 -0500 |
commit | 97a82ee3eca1be69bd2d08e8fd9db09c0807ae5d (patch) | |
tree | b032a1397fd33240d8fdc7d6e17059723d0ffe55 /apps/plugins/resistor.c | |
parent | 3745c813f924b12232c4f37610aecd23fe5654b8 (diff) | |
download | rockbox-97a82ee3eca1be69bd2d08e8fd9db09c0807ae5d.tar.gz rockbox-97a82ee3eca1be69bd2d08e8fd9db09c0807ae5d.zip |
plugins HAVE_BACKLIGHT helper remove ifdefs in favor of dummy functions
lessen the ifdef hell
Change-Id: I52f830284e4599f3fc3a75c27dda27058b8de1a3
Diffstat (limited to 'apps/plugins/resistor.c')
-rw-r--r-- | apps/plugins/resistor.c | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/apps/plugins/resistor.c b/apps/plugins/resistor.c index d32ac3fad9..4461dc0dea 100644 --- a/apps/plugins/resistor.c +++ b/apps/plugins/resistor.c | |||
@@ -574,9 +574,8 @@ static void display_helpfile(void) | |||
574 | 574 | ||
575 | static void led_resistance_calc(void) | 575 | static void led_resistance_calc(void) |
576 | { | 576 | { |
577 | #ifdef HAVE_BACKLIGHT | ||
578 | backlight_ignore_timeout(); | 577 | backlight_ignore_timeout(); |
579 | #endif | 578 | |
580 | int voltage_menu_selection, button_press, j, k, l, foreward_current = 0; | 579 | int voltage_menu_selection, button_press, j, k, l, foreward_current = 0; |
581 | int fwd_current_selection = 0; | 580 | int fwd_current_selection = 0; |
582 | bool quit = false; | 581 | bool quit = false; |
@@ -769,9 +768,8 @@ static void led_resistance_calc(void) | |||
769 | default: | 768 | default: |
770 | quit = true; | 769 | quit = true; |
771 | 770 | ||
772 | #ifdef HAVE_BACKLIGHT | ||
773 | backlight_use_settings(); | 771 | backlight_use_settings(); |
774 | #endif | 772 | |
775 | break; | 773 | break; |
776 | } | 774 | } |
777 | } | 775 | } |
@@ -784,9 +782,8 @@ static void led_resistance_calc(void) | |||
784 | 782 | ||
785 | static void resistance_to_color(void) | 783 | static void resistance_to_color(void) |
786 | { | 784 | { |
787 | #ifdef HAVE_BACKLIGHT | ||
788 | backlight_ignore_timeout(); | 785 | backlight_ignore_timeout(); |
789 | #endif | 786 | |
790 | int menu_selection; | 787 | int menu_selection; |
791 | int menu_selection_tol; | 788 | int menu_selection_tol; |
792 | int button_press; | 789 | int button_press; |
@@ -910,9 +907,9 @@ static void resistance_to_color(void) | |||
910 | break; | 907 | break; |
911 | default: | 908 | default: |
912 | quit = true; | 909 | quit = true; |
913 | #ifdef HAVE_BACKLIGHT | 910 | |
914 | backlight_use_settings(); | 911 | backlight_use_settings(); |
915 | #endif | 912 | |
916 | break; | 913 | break; |
917 | } | 914 | } |
918 | } | 915 | } |
@@ -924,9 +921,8 @@ static void resistance_to_color(void) | |||
924 | 921 | ||
925 | static void color_to_resistance(void) | 922 | static void color_to_resistance(void) |
926 | { | 923 | { |
927 | #ifdef HAVE_BACKLIGHT | ||
928 | backlight_ignore_timeout(); | 924 | backlight_ignore_timeout(); |
929 | #endif | 925 | |
930 | bool quit = false; | 926 | bool quit = false; |
931 | int button_input = 0; | 927 | int button_input = 0; |
932 | 928 | ||
@@ -995,9 +991,7 @@ static void color_to_resistance(void) | |||
995 | case PLA_SELECT: | 991 | case PLA_SELECT: |
996 | default: | 992 | default: |
997 | quit = true; | 993 | quit = true; |
998 | #ifdef HAVE_BACKLIGHT | ||
999 | backlight_use_settings(); | 994 | backlight_use_settings(); |
1000 | #endif | ||
1001 | break; | 995 | break; |
1002 | } | 996 | } |
1003 | } | 997 | } |