View Single Post
Old 01-24-2015, 10:33 AM   #33
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
Here come shots of the result with line_length+0..4 plus how the page looks like in FBReader. The picture of the clock on top is least distorted with +4 but still way to goand with +5 it crashes.

Likewise, using smem_len gives a segfault.
It really goes in the right way from +1 to +4. But the detected screen height might be larger than actual one so that the application crashes before pitch size goes right.

Could you also screen shot with these changes?
Code:
elseif vinfo.bits_per_pixel == 8 then
            self.bb = BB.new(vinfo.xres, vinfo.yres/2, BB.TYPE_BB8, self.data, finfo.line_length + 5)
else
to

Code:
elseif vinfo.bits_per_pixel == 8 then
            self.bb = BB.new(vinfo.xres, vinfo.yres/2, BB.TYPE_BB8, self.data, finfo.line_length + 8)
else
which only use the first half height of the screen for test and increases pitch size from finfo.line_length + 5 to finfo.line_length + 8. I expect a sane half screen in one of the four trials.

And could you also print some basic info of the framebuffer at line 40 like this:
Code:
print("pitch size", finfo.line_length)
print("framebuffer size", finfo.smem_len)
print("framebuffer width", vinfo.xres)
print("framebuffer height", vinfo.yres)
chrox is offline   Reply With Quote