forked from len0rd/rockbox
Disable unused LCD scroll functions in bootloaders
These functions just reset some state related to the scroll engine, which is already disabled for bootloaders. They get called from the LCD code and compiled into the binary, but have no real effect when the rest of the scroll engine is not present. Replacing the calls with inline stubs gets rid of this dead code from bootloaders. Change-Id: I12a6d8926e19477ae3a5913e7fc8aff41cecd970
This commit is contained in:
parent
b0a8cacd1d
commit
5fd5f56cac
2 changed files with 27 additions and 1 deletions
|
@ -38,10 +38,36 @@ extern void lcd_bidir_scroll(int threshold);
|
|||
extern void lcd_scroll_speed(int speed);
|
||||
extern void lcd_scroll_delay(int ms);
|
||||
|
||||
#ifdef BOOTLOADER
|
||||
static inline void lcd_scroll_stop(void)
|
||||
{
|
||||
}
|
||||
|
||||
static inline void lcd_scroll_stop_viewport(const struct viewport *vp)
|
||||
{
|
||||
(void)vp;
|
||||
}
|
||||
|
||||
static inline void lcd_scroll_stop_viewport_rect(const struct viewport *vp, int x, int y, int width, int height)
|
||||
{
|
||||
(void)vp;
|
||||
(void)x;
|
||||
(void)y;
|
||||
(void)width;
|
||||
(void)height;
|
||||
}
|
||||
|
||||
static inline bool lcd_scroll_now(struct scrollinfo *scroll)
|
||||
{
|
||||
(void)scroll;
|
||||
return false;
|
||||
}
|
||||
#else
|
||||
extern void lcd_scroll_stop(void);
|
||||
extern void lcd_scroll_stop_viewport(const struct viewport *vp);
|
||||
extern void lcd_scroll_stop_viewport_rect(const struct viewport *vp, int x, int y, int width, int height);
|
||||
extern bool lcd_scroll_now(struct scrollinfo *scroll);
|
||||
#endif
|
||||
#ifdef HAVE_REMOTE_LCD
|
||||
extern void lcd_remote_scroll_speed(int speed);
|
||||
extern void lcd_remote_scroll_delay(int ms);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue