Skip to content

Commit

Permalink
Export HW fb rotation (#757)
Browse files Browse the repository at this point in the history
We'll probably need it on the Kobo Forma
  • Loading branch information
NiLuJe committed Nov 11, 2018
1 parent 268292a commit 6b5849f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ffi/framebuffer_linux.lua
Expand Up @@ -11,6 +11,7 @@ local framebuffer = {
fd = -1,
fb_size = nil,
fb_bpp = nil,
fb_rota = nil,
data = nil,
}

Expand Down Expand Up @@ -133,6 +134,9 @@ function framebuffer:init()
-- Make accessing the bitdepth easier, because we might want to know we're running on Kobo's quirky 16bpp mode later...
self.fb_bpp = vinfo.bits_per_pixel
-- Same for the current hardware rotation, it's potentially useful info on the Kobo Forma
self.fb_rota = vinfo.rotate
if ffi.string(finfo.id, 7) == "eink_fb" then
-- classic eink framebuffer driver has grayscale values inverted (i.e. 0xF = black, 0 = white)
self.bb:invert()
Expand Down

0 comments on commit 6b5849f

Please sign in to comment.