mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-13 18:17:39 -04:00
put_line/scrolling: Make the scroll engine inform custom scrollers about start/stop of scrolling.
With the new lcd_putsxy_scroll_func() code can register custom scroll functions (put_line() makes use of that). In order for the custom scroller to be able to properly manage its userdata pointer (set via struct scrollinfo::userdata) the scroll engine must inform the scroller about start and stop of scrolling. To inform about start the lcd_scroll_* functions now return true when the line will scroll. To inform about stop the scroll engine calls into the scroller one last time, with the text set to NULL. put_line() can use this to release the userdata registered per scrolling line so that it can be recycled. This fixes that some scrolling lines became glitchy after some time because the userdata was recycled too early. Change-Id: Iff0a6ce2a4f9ae2bada1b8e62f4f5950224942a9
This commit is contained in:
parent
656261bde1
commit
488a1b983e
8 changed files with 95 additions and 54 deletions
|
@ -126,8 +126,8 @@ struct screen
|
|||
void (*putsxy)(int x, int y, const unsigned char *str);
|
||||
void (*puts)(int x, int y, const unsigned char *str);
|
||||
void (*putsf)(int x, int y, const unsigned char *str, ...);
|
||||
void (*puts_scroll)(int x, int y, const unsigned char *string);
|
||||
void (*putsxy_scroll_func)(int x, int y, const unsigned char *string,
|
||||
bool (*puts_scroll)(int x, int y, const unsigned char *string);
|
||||
bool (*putsxy_scroll_func)(int x, int y, const unsigned char *string,
|
||||
void (*scroll_func)(struct scrollinfo *),
|
||||
void *data, int x_offset);
|
||||
void (*scroll_speed)(int speed);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue