Kobo: check for RGBA vs BGRA the proper way (#11953)

i.e., poke at the fb vinfo data to check the component offsets.

Fix #11952
This commit is contained in:
NiLuJe
2024-06-01 20:39:17 +02:00
committed by GitHub
parent c5600ffe19
commit 6a4d433aa9

View File

@@ -701,7 +701,7 @@ function Kobo:init()
mxcfb_bypass_wait_for = mxcfb_bypass_wait_for,
no_cfa_post_processing = G_reader_settings:isTrue("no_cfa_post_processing"),
}
if self.screen.fb_bpp == 32 and not self:hasColorScreen() then
if self.screen.fb_bpp == 32 and self.screen._vinfo.red.offset ~= 0 then
-- Ensure we decode images properly, as our framebuffer is BGRA...
logger.info("Enabling Kobo @ 32bpp BGR tweaks")
self.hasBGRFrameBuffer = yes