summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSolomon Peachy <pizza@shaftnet.org>2023-05-17 09:10:13 -0400
committerSolomon Peachy <pizza@shaftnet.org>2023-05-17 11:03:02 -0400
commit9134c688d923bc776c939db5c6824e0871b71991 (patch)
tree1d64e28e4915d80c5df8205756c6cd0fe972c7e4
parentfdf661606c0b6cb05d3c5560adf566e03718443a (diff)
downloadrockbox-9134c688d923bc776c939db5c6824e0871b71991.tar.gz
rockbox-9134c688d923bc776c939db5c6824e0871b71991.zip
scroll: Eliminate a warning when building a bootloader
Bootloaders don't support scrolling, so don't even try to compile the scroll_thread stuff Change-Id: I6bd4f901a2c3e9b79654d27c0349be7e7aa3fa1a
-rw-r--r--firmware/scroll_engine.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/firmware/scroll_engine.c b/firmware/scroll_engine.c
index 913b4778a7..11355d1872 100644
--- a/firmware/scroll_engine.c
+++ b/firmware/scroll_engine.c
@@ -43,11 +43,12 @@ static const char scroll_tick_table[18] = {
100, 80, 64, 50, 40, 32, 25, 20, 16, 12, 10, 8, 6, 5, 4, 3, 2, 1
};
+#include "drivers/lcd-scroll.c"
+
+#ifndef BOOTLOADER
static void scroll_thread(void);
static const char scroll_name[] = "scroll";
-#include "drivers/lcd-scroll.c"
-
#ifdef HAVE_REMOTE_LCD
static struct event_queue scroll_queue SHAREDBSS_ATTR;
@@ -58,7 +59,7 @@ static struct event_queue scroll_queue SHAREDBSS_ATTR;
#undef LCDM
#define LCDM(ma) LCD_REMOTE_ ## ma
-#include "drivers/lcd-scroll.c"
+#include "drivers/lcd-scroll.c" // Yes, a second time.
static void sync_display_ticks(void)
{
@@ -105,7 +106,6 @@ static bool scroll_process_message(int delay)
static void scroll_thread(void) NORETURN_ATTR;
#ifdef HAVE_REMOTE_LCD
-
static void scroll_thread(void)
{
enum
@@ -176,18 +176,14 @@ static void scroll_thread(void)
while (1)
{
sleep(lcd_scroll_info.ticks);
-#if !defined(BOOTLOADER)
#if defined(HAVE_LCD_ENABLE) || defined(HAVE_LCD_SLEEP)
if (lcd_active())
#endif
lcd_scroll_worker();
-#endif /* !BOOTLOADER */
}
}
#endif /* HAVE_REMOTE_LCD */
-
-#ifndef BOOTLOADER
void scroll_init(void)
{
static char scroll_stack[DEFAULT_STACK_SIZE*3];