summaryrefslogtreecommitdiff
path: root/apps/gui
diff options
context:
space:
mode:
authorJonathan Gordon <rockbox@jdgordon.info>2014-06-19 19:46:36 +1000
committerThomas Martitz <kugel@rockbox.org>2014-06-29 11:48:25 +0200
commit7b377d29fbdc32d0e413614370b00f21cd22049b (patch)
tree47daf6890feb3465e02d8c3e1bd4f253001e7534 /apps/gui
parent7d62f817703b590b3726e88584226e0cec40306a (diff)
downloadrockbox-7b377d29fbdc32d0e413614370b00f21cd22049b.zip
rockbox-7b377d29fbdc32d0e413614370b00f21cd22049b.tar.gz
rockbox-7b377d29fbdc32d0e413614370b00f21cd22049b.tar.bz2
rockbox-7b377d29fbdc32d0e413614370b00f21cd22049b.tar.xz
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')
-rw-r--r--apps/gui/skin_engine/skin_parser.c10
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 c659e70..0e7150c 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)
(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};