Skip to content

Commit

Permalink
avoid doing zero-size refreshes
Browse files Browse the repository at this point in the history
Those refresh requests will crash (at least) Kobos' framebuffer
driver and create the image of a locked-up device.
Beware: device is not actually locked up and does in fact react
to touch screen events!
  • Loading branch information
hwhw committed Dec 5, 2014
1 parent 247cb8b commit 9410474
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions ffi/framebuffer_mxcfb.lua
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,11 @@ local function mxc_update(fb, refarea, refreshtype, waveform_mode, wait, x, y, w
h, y = BB.checkBounds(h or bb:getHeight(), y or 0, 0, bb:getHeight(), 0xFFFF)
x, y, w, h = bb:getPhysicalRect(x, y, w, h)
if w == 0 or h == 0 then
fb.debug("got a 0 size (height and/or width) refresh request, ignoring it.")
return
end
local rect = { x=x, y=y, w=w, h=h }
-- always wait for conflicts:
fb:_wait_for_conflicting(rect)
Expand Down

0 comments on commit 9410474

Please sign in to comment.