Don't show SW dither toggle on devices w/ HW dithering

This commit is contained in:
NiLuJe
2022-02-05 20:20:15 +01:00
parent 3122bcd9bc
commit afe1dc9681
3 changed files with 6 additions and 5 deletions

View File

@@ -497,7 +497,8 @@ function Document:drawPage(target, x, y, rect, pageno, zoom, rotation, gamma, re
local tile = self:renderPage(pageno, rect, zoom, rotation, gamma, render_mode)
-- Enable SW dithering if requested (only available in koptoptions)
-- Much Like ReaderView, also enforce SW dithering in PicDocument if the device can't do HW dithering...
if (self.is_pic and CanvasContext:hasEinkScreen() and not CanvasContext:canHWDither() and CanvasContext.fb_bpp == 8) or (self.configurable.sw_dithering and self.configurable.sw_dithering == 1) then
if (self.is_pic and CanvasContext:hasEinkScreen() and not CanvasContext:canHWDither() and CanvasContext.fb_bpp == 8)
or (self.configurable.sw_dithering and self.configurable.sw_dithering == 1) then
target:ditherblitFrom(tile.bb,
x, y,
rect.x - tile.excerpt.x,