diff options
author | Jonathan Gordon <rockbox@jdgordon.info> | 2014-06-19 19:46:36 +1000 |
---|---|---|
committer | Thomas Martitz <kugel@rockbox.org> | 2014-06-29 11:48:25 +0200 |
commit | 7b377d29fbdc32d0e413614370b00f21cd22049b (patch) | |
tree | 47daf6890feb3465e02d8c3e1bd4f253001e7534 /apps/gui/skin_engine | |
parent | 7d62f817703b590b3726e88584226e0cec40306a (diff) | |
download | rockbox-7b377d29fbdc32d0e413614370b00f21cd22049b.tar.gz rockbox-7b377d29fbdc32d0e413614370b00f21cd22049b.zip |
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>
Diffstat (limited to 'apps/gui/skin_engine')
-rw-r--r-- | apps/gui/skin_engine/skin_parser.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/apps/gui/skin_engine/skin_parser.c b/apps/gui/skin_engine/skin_parser.c index c659e70730..0e7150c553 100644 --- a/apps/gui/skin_engine/skin_parser.c +++ b/apps/gui/skin_engine/skin_parser.c | |||
@@ -1752,6 +1752,16 @@ static int buflib_move_callback(int handle, void* current, void* new) | |||
1752 | (void)new; | 1752 | (void)new; |
1753 | if (handle == currently_loading_handle) | 1753 | if (handle == currently_loading_handle) |
1754 | return BUFLIB_CB_CANNOT_MOVE; | 1754 | return BUFLIB_CB_CANNOT_MOVE; |
1755 | /* Any active skins may be scrolling - which means using viewports which | ||
1756 | * will be moved after this callback returns. This is a hammer to make that | ||
1757 | * safe. TODO: use a screwdriver instead. | ||
1758 | */ | ||
1759 | FOR_NB_SCREENS(i) | ||
1760 | screens[i].scroll_stop(); | ||
1761 | |||
1762 | for (int i = 0; i < SKINNABLE_SCREENS_COUNT; i++) | ||
1763 | skin_request_full_update(i); | ||
1764 | |||
1755 | return BUFLIB_CB_OK; | 1765 | return BUFLIB_CB_OK; |
1756 | } | 1766 | } |
1757 | static struct buflib_callbacks buflib_ops = {buflib_move_callback, NULL, NULL}; | 1767 | static struct buflib_callbacks buflib_ops = {buflib_move_callback, NULL, NULL}; |