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/rockboy | |
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/rockboy')
-rw-r--r-- | apps/plugins/rockboy/menu.c | 6 | ||||
-rw-r--r-- | apps/plugins/rockboy/rockboy.c | 5 |
2 files changed, 3 insertions, 8 deletions
diff --git a/apps/plugins/rockboy/menu.c b/apps/plugins/rockboy/menu.c index 6fafdc11a6..caa8d499cb 100644 --- a/apps/plugins/rockboy/menu.c +++ b/apps/plugins/rockboy/menu.c | |||
@@ -83,9 +83,8 @@ int do_user_menu(void) { | |||
83 | rb->lcd_set_mode(LCD_MODE_RGB565); | 83 | rb->lcd_set_mode(LCD_MODE_RGB565); |
84 | #endif | 84 | #endif |
85 | 85 | ||
86 | #ifdef HAVE_BACKLIGHT | ||
87 | backlight_use_settings(); | 86 | backlight_use_settings(); |
88 | #endif | 87 | |
89 | /* Clean out the button Queue */ | 88 | /* Clean out the button Queue */ |
90 | while (rb->button_get(false) != BUTTON_NONE) | 89 | while (rb->button_get(false) != BUTTON_NONE) |
91 | rb->yield(); | 90 | rb->yield(); |
@@ -139,10 +138,9 @@ int do_user_menu(void) { | |||
139 | rb->lcd_set_mode(LCD_MODE_PAL256); | 138 | rb->lcd_set_mode(LCD_MODE_PAL256); |
140 | #endif | 139 | #endif |
141 | 140 | ||
142 | #ifdef HAVE_BACKLIGHT | ||
143 | /* ignore backlight time out */ | 141 | /* ignore backlight time out */ |
144 | backlight_ignore_timeout(); | 142 | backlight_ignore_timeout(); |
145 | #endif | 143 | |
146 | return ret; | 144 | return ret; |
147 | } | 145 | } |
148 | 146 | ||
diff --git a/apps/plugins/rockboy/rockboy.c b/apps/plugins/rockboy/rockboy.c index 2c5c6e4dbf..2d0c349507 100644 --- a/apps/plugins/rockboy/rockboy.c +++ b/apps/plugins/rockboy/rockboy.c | |||
@@ -602,10 +602,9 @@ enum plugin_status plugin_start(const void* parameter) | |||
602 | rb->lcd_set_mode(LCD_MODE_PAL256); | 602 | rb->lcd_set_mode(LCD_MODE_PAL256); |
603 | #endif | 603 | #endif |
604 | 604 | ||
605 | #ifdef HAVE_BACKLIGHT | ||
606 | /* ignore backlight time out */ | 605 | /* ignore backlight time out */ |
607 | backlight_ignore_timeout(); | 606 | backlight_ignore_timeout(); |
608 | #endif | 607 | |
609 | gnuboy_main(parameter); | 608 | gnuboy_main(parameter); |
610 | 609 | ||
611 | #ifdef HAVE_WHEEL_POSITION | 610 | #ifdef HAVE_WHEEL_POSITION |
@@ -616,9 +615,7 @@ enum plugin_status plugin_start(const void* parameter) | |||
616 | rb->lcd_set_mode(LCD_MODE_RGB565); | 615 | rb->lcd_set_mode(LCD_MODE_RGB565); |
617 | #endif | 616 | #endif |
618 | 617 | ||
619 | #ifdef HAVE_BACKLIGHT | ||
620 | backlight_use_settings(); | 618 | backlight_use_settings(); |
621 | #endif | ||
622 | 619 | ||
623 | if(!rb->audio_status()) | 620 | if(!rb->audio_status()) |
624 | rockboy_pcm_close(); | 621 | rockboy_pcm_close(); |