firmware: allow screendump in bootloader

Enabled if target defines HAVE_BOOTLOADER_SCREENDUMP

Change-Id: Idc135ef81e55d0f3eb8e7d2763d455c6455cf8fd
This commit is contained in:
Aidan MacDonald 2022-03-20 13:00:10 +00:00
parent e956f7dc83
commit 9bde653410
3 changed files with 12 additions and 8 deletions

View file

@ -286,7 +286,7 @@ font_cache.c
font.c font.c
hangul.c hangul.c
lru.c lru.c
#ifndef BOOTLOADER #ifdef HAVE_SCREENDUMP
screendump.c screendump.c
#endif #endif
#if LCD_DEPTH == 1 #if LCD_DEPTH == 1

View file

@ -1281,6 +1281,10 @@ Lyre prototype 1 */
#endif /* SIMULATOR */ #endif /* SIMULATOR */
#endif /* default SDL SW volume conditions */ #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 /* null audiohw setting macro for when codec header is included for reasons
other than audio support */ other than audio support */
#define AUDIOHW_SETTING(name, us, nd, st, minv, maxv, defv, expr...) #define AUDIOHW_SETTING(name, us, nd, st, minv, maxv, defv, expr...)

View file

@ -52,12 +52,7 @@
#define DUMP_BMP_LINESIZE ((LCD_WIDTH*3 + 3) & ~3) #define DUMP_BMP_LINESIZE ((LCD_WIDTH*3 + 3) & ~3)
#endif #endif
#ifdef BOOTLOADER #ifdef HAVE_SCREENDUMP
#define screen_dump() do { } while(0)
#define remote_screen_dump() do { } while(0)
#else /* !BOOTLOADER */
/* Save a .BMP file containing the current screen contents. */ /* Save a .BMP file containing the current screen contents. */
void screen_dump(void); void screen_dump(void);
@ -69,6 +64,11 @@ void screen_dump_set_hook(void (*hook)(int fd));
void remote_screen_dump(void); void remote_screen_dump(void);
#endif #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__ */ #endif /* __SCREENDUMP_H__ */