diff options
author | William Wilgus <me.theuser@yahoo.com> | 2018-07-27 15:09:55 +0200 |
---|---|---|
committer | William Wilgus <me.theuser@yahoo.com> | 2018-07-27 15:09:55 +0200 |
commit | 400603abdfb4ba7566e0cae8dbed9268f06716dc (patch) | |
tree | 081559b876f26d6564d32470751b47a5814e5560 /apps/plugins/lua/include_lua | |
parent | dcd71e66bd5f0b521c9f98ebe83ff1f7abb62918 (diff) | |
download | rockbox-400603abdfb4ba7566e0cae8dbed9268f06716dc.tar.gz rockbox-400603abdfb4ba7566e0cae8dbed9268f06716dc.zip |
Lua -- Fix device hang when scroll function active on clear_screen
I previously noticed that manually clearing the framebuffer while scroll
function was active caused lua to crash
I could reproduce in sim and on device but I thought using the plugin
supplied rb->lcd_clear_screen was immune to this issue
Unfortunately some devices exhibit this behavior with the plugin function
as well
This patch adds rb->lcd_scroll_stop() before lcd_clear_screen at lua start-up
and to the supplied include file lcd.lua
Change-Id: I9800145e5c834ea27df5db5f1bca50b0d40faa49
Diffstat (limited to 'apps/plugins/lua/include_lua')
-rw-r--r-- | apps/plugins/lua/include_lua/lcd.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/plugins/lua/include_lua/lcd.lua b/apps/plugins/lua/include_lua/lcd.lua index bbf0f240aa..e0a3c5895a 100644 --- a/apps/plugins/lua/include_lua/lcd.lua +++ b/apps/plugins/lua/include_lua/lcd.lua | |||
@@ -80,10 +80,10 @@ local _lcd = {} do | |||
80 | 80 | ||
81 | -- clears lcd, optional.. ([color, x1, y1, x2, y2, clip]) | 81 | -- clears lcd, optional.. ([color, x1, y1, x2, y2, clip]) |
82 | local function clear(t, clr, ...) | 82 | local function clear(t, clr, ...) |
83 | rb.lcd_scroll_stop() --rb really doesn't like bg change while scroll | ||
83 | if clr == _NIL and ... == _NIL then | 84 | if clr == _NIL and ... == _NIL then |
84 | rb.lcd_clear_display() | 85 | rb.lcd_clear_display() |
85 | else | 86 | else |
86 | rb.lcd_scroll_stop() --rb really doesn't like bg change while scroll | ||
87 | _LCD:clear(clr, ...) | 87 | _LCD:clear(clr, ...) |
88 | end | 88 | end |
89 | end | 89 | end |