summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAidan MacDonald <amachronic@protonmail.com>2022-03-20 13:00:10 +0000
committerAidan MacDonald <amachronic@protonmail.com>2022-03-24 18:59:50 -0400
commit9bde653410e83d5e97729aef212341f3cde790bc (patch)
treee5d7cd4f94445b3d5bf7f021b934bcaa9094a7a5
parente956f7dc8369b3d1928a1274ca6866b42116cc1f (diff)
downloadrockbox-9bde653410.tar.gz
rockbox-9bde653410.zip
firmware: allow screendump in bootloader
Enabled if target defines HAVE_BOOTLOADER_SCREENDUMP Change-Id: Idc135ef81e55d0f3eb8e7d2763d455c6455cf8fd
-rw-r--r--firmware/SOURCES2
-rw-r--r--firmware/export/config.h4
-rw-r--r--firmware/export/screendump.h14
3 files changed, 12 insertions, 8 deletions
diff --git a/firmware/SOURCES b/firmware/SOURCES
index 001a86335e..b72a7521e9 100644
--- a/firmware/SOURCES
+++ b/firmware/SOURCES
@@ -286,7 +286,7 @@ font_cache.c
font.c
hangul.c
lru.c
-#ifndef BOOTLOADER
+#ifdef HAVE_SCREENDUMP
screendump.c
#endif
#if LCD_DEPTH == 1
diff --git a/firmware/export/config.h b/firmware/export/config.h
index efd99569b6..7002b2a3c5 100644
--- a/firmware/export/config.h
+++ b/firmware/export/config.h
@@ -1281,6 +1281,10 @@ Lyre prototype 1 */
#endif /* SIMULATOR */
#endif /* default SDL SW volume conditions */
+#if !defined(BOOTLOADER) || defined(HAVE_BOOTLOADER_SCREENDUMP)
+# define HAVE_SCREENDUMP
+#endif
+
/* null audiohw setting macro for when codec header is included for reasons
other than audio support */
#define AUDIOHW_SETTING(name, us, nd, st, minv, maxv, defv, expr...)
diff --git a/firmware/export/screendump.h b/firmware/export/screendump.h
index 953184c3ac..b8fc27047d 100644
--- a/firmware/export/screendump.h
+++ b/firmware/export/screendump.h
@@ -52,12 +52,7 @@
#define DUMP_BMP_LINESIZE ((LCD_WIDTH*3 + 3) & ~3)
#endif
-#ifdef BOOTLOADER
-
-#define screen_dump() do { } while(0)
-#define remote_screen_dump() do { } while(0)
-
-#else /* !BOOTLOADER */
+#ifdef HAVE_SCREENDUMP
/* Save a .BMP file containing the current screen contents. */
void screen_dump(void);
@@ -69,6 +64,11 @@ void screen_dump_set_hook(void (*hook)(int fd));
void remote_screen_dump(void);
#endif
-#endif /* !BOOTLOADER */
+#else /* !HAVE_SCREENDUMP */
+
+#define screen_dump() do { } while(0)
+#define remote_screen_dump() do { } while(0)
+
+#endif /* HAVE_SCREENDUMP */
#endif /* __SCREENDUMP_H__ */