forked from len0rd/rockbox
skin_engine: kill scrolling if the buffer moves
I have a suspicion that if there is any scrolling skin lines when the buflib buffer moves it will cause the lcd code to crash. This *hopefully* explains the random skin related crashed which have been reported. Change-Id: I04ee58292e1cea7c77ef9737b0641192f4f7e4ba Reviewed-on: http://gerrit.rockbox.org/877 Reviewed-by: Thomas Martitz <kugel@rockbox.org>
This commit is contained in:
parent
7d62f81770
commit
7b377d29fb
1 changed files with 10 additions and 0 deletions
|
|
@ -1752,6 +1752,16 @@ static int buflib_move_callback(int handle, void* current, void* new)
|
|||
(void)new;
|
||||
if (handle == currently_loading_handle)
|
||||
return BUFLIB_CB_CANNOT_MOVE;
|
||||
/* Any active skins may be scrolling - which means using viewports which
|
||||
* will be moved after this callback returns. This is a hammer to make that
|
||||
* safe. TODO: use a screwdriver instead.
|
||||
*/
|
||||
FOR_NB_SCREENS(i)
|
||||
screens[i].scroll_stop();
|
||||
|
||||
for (int i = 0; i < SKINNABLE_SCREENS_COUNT; i++)
|
||||
skin_request_full_update(i);
|
||||
|
||||
return BUFLIB_CB_OK;
|
||||
}
|
||||
static struct buflib_callbacks buflib_ops = {buflib_move_callback, NULL, NULL};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue