View Single Post
Old 01-19-2015, 12:04 PM   #19
chrox
Zealot
chrox ought to be getting tired of karma fortunes by now.chrox ought to be getting tired of karma fortunes by now.chrox ought to be getting tired of karma fortunes by now.chrox ought to be getting tired of karma fortunes by now.chrox ought to be getting tired of karma fortunes by now.chrox ought to be getting tired of karma fortunes by now.chrox ought to be getting tired of karma fortunes by now.chrox ought to be getting tired of karma fortunes by now.chrox ought to be getting tired of karma fortunes by now.chrox ought to be getting tired of karma fortunes by now.chrox ought to be getting tired of karma fortunes by now.
 
Posts: 144
Karma: 405567
Join Date: Nov 2012
Device: K3 KPW PB840
Quote:
Originally Posted by sadowski View Post
And this is how it looks like:
Yes, it looks like the pitch size (bytes for a single line) is detected wrong, more precisely pitch size is less than actual one used in the framebuffer device otherwise the application would very likely have already crashed.

So you can just hack this line: https://github.com/koreader/koreader..._linux.lua#L64 in the "koreader/ffi/framebuffer_linux.lua" file at line 64:

Code:
elseif vinfo.bits_per_pixel == 8 then
            self.bb = BB.new(vinfo.xres, vinfo.yres, BB.TYPE_BB8, self.data, finfo.line_length)
else
this way:
Code:
elseif vinfo.bits_per_pixel == 8 then
            self.bb = BB.new(vinfo.xres, vinfo.yres, BB.TYPE_BB8, self.data, finfo.line_length + 4)
else
or:
Code:
elseif vinfo.bits_per_pixel == 8 then
            self.bb = BB.new(vinfo.xres, vinfo.yres, BB.TYPE_BB8, self.data, finfo.line_length + 8)
else
until you make it right.
chrox is offline   Reply With Quote